LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-29-2015, 04:57 PM   #1
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,972

Rep: Reputation: 271Reputation: 271Reputation: 271
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.
 
Old 09-29-2015, 05:18 PM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
i assume by bandwidth you actually mean how much has been tranceived. :
Code:
[schneidz@hyper ~]$ ifconfig
enp0s10: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.25  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::92fb:a6ff:fe2a:5b68  prefixlen 64  scopeid 0x20<link>
        ether 90:fb:a6:2a:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 1942713  bytes 948892244 (904.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1772049  bytes 338606044 (322.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 
1 members found this post helpful.
Old 09-29-2015, 05:30 PM   #3
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,972

Original Poster
Rep: Reputation: 271Reputation: 271Reputation: 271
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.
 
Old 09-30-2015, 07:30 AM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
thanks, i dont have any experience with iptraf-ng; please explain your solution. it mite help others in the future.
 
Old 10-01-2015, 02:25 PM   #5
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,972

Original Poster
Rep: Reputation: 271Reputation: 271Reputation: 271
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
is there a network monitoriing program that can monitor my router's activity baronobeefdip Linux - Networking 5 09-01-2011 03:43 PM
Monitor Network activity by website? Darrell22 Linux - Networking 2 05-22-2009 12:34 AM
Network activity monitor alpha754293 Linux - Newbie 2 05-16-2006 11:27 PM
Program to monitor wireless activity? dr_zayus69 Linux - Software 2 01-01-2006 09:55 AM
Need program monitor for SMTP/internet activity korbind Linux - Software 6 04-16-2005 04:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration