Escolar Documentos
Profissional Documentos
Cultura Documentos
- Ask Ubuntu
2 Any solutions for the "Is it possible to add this info to the chart of top ?"
part? :) – Janaka Bandara Dec 25 '15 at 2:57
18 Answers
Here are some nice tools in the Ubuntu repositories for command
line network traffic monitoring:
403 bmon - shows multiple interfaces at once
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 1/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 2/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
7 bmon is really cool! has a graph like slurm but not colorful. – EtherealJan
10 '14 at 21:27
Then run
sudo iftop
Enjoy!
6 To see anything, I have to run (Ubuntu using wifi): $ sudo iftop -i wlan0 –
russian_spy Jun 3 '15 at 20:08
does iftop also record or log the network bandwidth from time to time?
Currently I'm using both vnstat and iftop for different usage,
and vnstat logs the bandwidth usage. It would be excessive and add
more loads to my server if iftop does it too. – Oki Erie Rinaldi Oct 10
'18 at 4:52
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 4/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
The thing that's different and maybe is cooler about this one is that it
118 shows traffic per process, like the image shows
Very useful utility, just note that you may need to take a few extra steps
installing to make it work on 14.04
as askubuntu.com/a/729560/79176describes. – Huge May 18 '17 at 13:56
For those with Debian Jessie who happen to come here, too: A working
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 5/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
version is in Backports: apt-get install nethogs/jessie-
backports (you need to add jessie-backports first). – Tino Feb 10 '18 at
19:46
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 6/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
1,936 18 20
1 This is by far the nicest visiual graph i've ever seen in a plain text display.
I will be looking into the gui library by the same author
now: urwid.org(source code and author: github.com/wardi) –
ThorSummoner Dec 11 '15 at 23:25
@felwithe That probably means you passed the wrong network interface
name. Try changing wlan0 in that command to eth0 or to whatever is
the name of the network interface in your system. See
also:unix.stackexchange.com/a/125406 – Denilson Sá Maia Apr 8 '18 at
22:53
iptraf
42 IPTraf is a console-based network statistics utility for Linux. It
gathers a variety of figures such as TCP connection packet and
byte counts, interface statistics and activity indicators, TCP/UDP
traffic breakdowns, and LAN station packet and byte counts.
Features
Protocols Recognized
Supported Interfaces
Source http://iptraf.seul.org/about.html
Installation
With apt :
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 8/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
http://iptraf.seul.org/download.html
Screenshots
Current Connections:
Current Ports:
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 9/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 10/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
Source http://iptraf.seul.org/shots.html
tcpdump -i eth0
25 That will give you a streaming information of all the data flowing from
that interface (your ethernet card). Similar to wireshark.
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 11/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
This will certainly display the network information... Not a very user-
friendly interface, nor does it have aggregate stats. Definitely think of this
like wireshark. – user2943160 Jul 6 '16 at 18:25
2 but this is only the over-all statistic for this session. I would see if the
connection is active or not. – IndexOutOfBoundsException Feb 17 '13 at
10:38
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 12/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
Install ’vnstat’ it can show traffic for an interface. You can install
some plotting packages to get some nice graphs.
13 answered Feb 17 '13 at 11:33
McNisse
1,465 1 12 15
sar -n DEV 1
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 13/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
References
http://www.brendangregg.com/linuxperf.html
Linux Performance Observability: sar
+1 for mentioning sar , which does the job and is included (and enabled)
by default with most if not all distros. – vladr Mar 29 '18 at 18:06
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 14/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
If you are looking for something extremely simple, but still useful,
try ifstat
11
$ sudo apt-get install ifstat
$ ifstat
eth0 wlan0
KB/s in KB/s out KB/s in KB/s out
0.00 0.00 0.96 4.79
0.00 0.00 0.04 0.14
Ifstat is good tool and it will give you all the interface network usage
with respect to time.
8
sudo apt-get install ifstat
edited Feb 21 at 4:11
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 17/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
answered Nov 23 '18 at 0:19
NatoBoram
203 1 12
So using ip command:
$ ip -s link
Or
$ ip -s -h link
http://www.binarytides.com/linux-commands-monitor-network/
2
UPDATE:
There's also conky.
You might have the package listed in your system's currently used
1 repositories. Try running:
Harmattan
Then, edit the file according to the instructions on the linked page.
TIP
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 20/21
04/04/2019 networking - How to display network traffic in the terminal? - Ask Ubuntu
Modify the file after copying it to your home folder, this way you get
to keep the original un-altered files in case you need to re-copy
the .conkyrc file for a theme.
https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal 21/21