Changes between Initial Version and Version 1 of plugin_netdev


Ignore:
Timestamp:
01/09/05 21:12:41 (15 years ago)
Author:
michael
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • plugin_netdev

    v1 v1  
     1= netdev plugin =
     2
     3This plugin provides an interface to the /proc/net/dev file.
     4
     5== Functions ==
     6
     7||netdev(device, key, delay)||parse /proc/net/dev||
     8||netdev::fast(device, key, delay)||parse /proc/net/dev without regex support||
     9
     10'device' is a valid network device name, e.g. 'eth0' (do a 'cat /proc/net/dev' for valid names on your system)
     11
     12The 'key' parameter does not have any fixed values, but is taken as a column search key into the /proc/net/dev file. Common keys are 'Rx_bytes' or 'Tx_packets'. Do a 'cat /proc/net/dev' to see which keys are available on your system. Note that every column header is prefixed with either 'Rx_' (Receive) or 'Tx_' (Transmit).
     13
     14The 'delay' value specifies a period of time (in milliseconds) for a delta computation. If you use a delta of 0 (zero), you get the absolute values (same as in /proc/net/dev). For delay values > 0 you get the delta value in 1/sec unit. Using a delta value of 500 msec seems to be a good choice.
     15
     16Note that the 'device' field is interpreted as a 'regular expression' (regex), if you use a regex you get the sum of all matching devices (e.g. 'netdev ('eth.', 'Tx_bytes', 500)' will return the sum of transmitted bytes for eth0, eth1, eth2, ...)
     17
     18The only difference between netdev() and netdev::fast() is that netdev::fast() does not support regular expressions and therefore takes less cpu time.
     19
     20----