Up-/download rate for a single host (from shell)
Hi all,
I have a slave node uploading all kinds of backups to my server in the internet. Now I would like to display the actual upload and download rate to this server (not the entire nic-traffic, any protocol) in a small php-page for easy monitoring. I had a look at quite some monitoring tools and the one which kind of offers what I am looking for is iftop with a filter on the IP of my server. As I would like to periodically update a file with the actual rates, an interactive program won't do. A possibility would be to filter the packages myself using http://search.cpan.org/~kcarnut/Net-Pcap-0.05/Pcap.pm but this seems to be quite a long shot. The optimal solution would be a program or script printing out the actual upload to a host specified in the options to STDOUT. Thank you for your help |
Have you looked at ntop? http://www.ntop.org/
Not sure about filtering capabilities but I think its worth trying. |
Hi tva,
yeah I looked into it - it is pretty heavyweight and a bit complicated to get the actual up/download rate with a script (I tried filtering through the output with perl regexp). looking into gathering packets for a second or two with ngrep and dumping them into a temp file - but this too is ugly as hell... |
Hi,
solved it using iptables: Code:
iptables -N myserver Code:
iptables -L -v -n -x -Z Cheers! |
All times are GMT -5. The time now is 07:29 AM. |