how to display the actual network traffic (wireless) in a terminal?
Additionally: Is it possible to add this info to the chart of top
?
how to display the actual network traffic (wireless) in a terminal?
Additionally: Is it possible to add this info to the chart of top
?
Here are some nice tools in the Ubuntu repositories for command line network traffic monitoring:
bmon - shows multiple interfaces at once
slurm - has nice colored graphs
tcptrack - A favorite. Tells how much bandwidth is being used and also what protocol (service/port) and destination the transmission is taking place to. Very helpful when you want to know exactly what is using up your bandwidth
It's quite easy! install "iftop" with:
Then run
from any terminal!
Enjoy!
Someone should also have mentioned
nethogs
.sudo apt-get -y install nethogs
sudo nethogs
The thing that's different and maybe is cooler about this one is that it shows traffic per process, like the image shows
Take a look at the page
There is a nice tool called speedometer that displays a graph in the terminal using Unicode block characters, colors, and even adds labels to each peak in the graph.
It has several options, can monitor multiple interfaces, can show multiple graphs in several rows or columns, and can even monitor the download speed of a single file (by watching the file size on disk).
iptraf
Source http://iptraf.seul.org/about.html
Installation
With
apt
:Or download the source:
http://iptraf.seul.org/download.html
Screenshots
Current Connections:
Current Ports:
Summary of all Interfaces:
Detailed per Interface:
Source http://iptraf.seul.org/shots.html
That will give you a streaming information of all the data flowing from that interface (your ethernet card). Similar to wireshark.
Use
ifconfig
to see a list of your machines interfaces.I think
ifconfig [interface]
will do that. Like:It shows RX bytes:73934806 (373.9 MB) and TX bytes:39111569 (39.1 MB).
If you are looking for something extremely simple, but still useful, try
ifstat
It monitors all interfaces at once, printing a new line every second. Useful to pipe into another script, or to leave running and observe the bandwidth usage over time. Not as pretty as other tools, but it gets the job done.
There are some useful options listed in the manpage:
This is not specific to networking, but Glances can display network traffic of different interfaces.
Install it with one of those commands :
Another useful tool is sar. Install it,
How to use it:
And Brendan's amazing graph guide:
References