Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I use a broadband ADSL service that has a monthly usage cap. As my Linux machine generates most of the traffic, I would like to use it to monitor my usage.
Can anyone suggest some software that would be able to monitor my network usage?
The newer ADSL modems hava a web interface that you can use to configure the modem. If you have one of these, somewhere in all those pages is a running tally of bytes uploaded/dowwnloaded since the last reset. Usually you can also reset the counters to zero (eg at the beginning of your accounting period). For my zoom X5, I click on Advanced Settings, then ATM Status, to see a whole load of statistics.
This has the advantage that it monitors your connection, rather than one specific machine.
Hadn't thought of that. The router does have a stats page, but it only shows packet counts, not byte counts, and as packets vary in size that's not overly useful, so I think it may have to be some software after all.
#!/bin/sh
#
# ip-down.local - called to add stats to /var/log/net
#
# Sat Oct 8 16:12:58 BST 2005
#
echo `date; /sbin/ifconfig $1 |
sed -n '7s/([^)]*)//gp'` >> /var/log/net
It takes the RX/TX info from line seven of the ifconfig command for your ppp device and puts it into a logging file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.