osdl.org!shemminger | aba5acd | 2004-04-15 20:56:59 +0000 | [diff] [blame] | 1 | <!doctype linuxdoc system> |
| 2 | |
| 3 | <article> |
| 4 | |
| 5 | <title>RTACCT Utility |
| 6 | <author>Robert Olsson |
| 7 | <date>some_negative_number, 20 Dec 2001 |
| 8 | |
| 9 | <p> |
| 10 | Here is some code for monitoring the route cache. For systems handling high |
| 11 | network load, servers, routers, firewalls etc the route cache and its garbage |
| 12 | collection is crucial. Linux has a solid implementation. |
| 13 | |
| 14 | <p> |
| 15 | The kernel patch (not required since linux-2.4.7) adds statistics counters |
| 16 | from route cache process into |
| 17 | /proc/net/rt_cache_stat. A companion user mode program presents the statistics |
| 18 | in a vmstat or iostat manner. The ratio between cache hits and misses gives |
| 19 | the flow length. |
| 20 | |
| 21 | <p> |
| 22 | Hopefully it can help understanding performance and DoS and other related |
| 23 | issues. |
| 24 | |
| 25 | <p> An URL where newer versions of this utility can be (probably) found |
| 26 | is ftp://robur.slu.se/pub/Linux/net-development/rt_cache_stat/ |
| 27 | |
| 28 | |
| 29 | <p><bf/Description/ |
| 30 | |
| 31 | <p>The format of the command is: |
| 32 | |
| 33 | <tscreen><verb> |
| 34 | rtstat [ OPTIONS ] |
| 35 | </verb></tscreen> |
| 36 | |
| 37 | <p> <tt/OPTIONS/ are: |
| 38 | |
| 39 | <itemize> |
| 40 | |
| 41 | <item><tt/-h/, <tt/-help/ - show help page and version of the utility. |
| 42 | |
| 43 | <item><tt/-i INTERVAL/ - interval between snapshots, default value is |
| 44 | 2 seconds. |
| 45 | |
| 46 | <item><tt/-s NUMBER/ - whether to print header line. 0 inhibits header line, |
| 47 | 1 prescribes to print it once and 2 (this is default setting) forces header |
| 48 | line each 20 lines. |
| 49 | |
| 50 | </itemize> |
| 51 | |
| 52 | </article> |