[SOLVED] Is there a program that will monitor network activity in the background?
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.
Is there a program that will monitor network activity in the background?
I want a program to monitor network access in the background (which tcpdump, netwatch, and iptraf-ng don't seem to do) so I can keep track of total bandwidth used.
ifconfig summarizes for that session. I want a program that writes to a log and either keeps a running total or allows me to grep it out. I suppose I could add a task to shutdown to extract the info from ifconfig. I looked more closely at iptraf-ng, which seems to do what I wanted. Sorry for asking before looking more closely.
iptraf-ng, when run with the switches -B -i eth0 runs in the background and logs every packet in /var/log/iptraf/ . Unfortunately it quits for no apparent reason for me after a minute or so, even if I set a timeout with the -t switch. Without the -B switch it stays in the foreground and reports traffic.
Because I couldn't get it to work I wrote a short script to log total traffic for every session with ifconfig. Unfortunately that requires me to run it every time I end a session.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.