If you are trying to get speed information on remote servers, you need to be running an snmp daemon, probably from the net-snmp package.Then you basically pull ifInOctects and ifOutOctets from the remote server and compare it to the previous value.
If you are doing it on a local server you basically pull and parse /proc/net/netstat and then compare it to a previous value. Somewhere around I have a copy of the code that generates the bandwidth meter on kernel.org, and I could dig it up if you are interested. | [reply] [d/l] [select] |
| [reply] |
Have a look at MRTG, the Multi Router Traffic Grapher. Does nice graphs, and you can plug in your own perl script to monitor just about anything. | [reply] |