iftop is great tool to view almost live bandwidth usage distinguished by source-ip source-port destination-ip destination port.
I'm using it to see which client's ip is using most bandwidth.
Now I would like to store output somewhere.
iftop uses ncurses so
iftop > log.txt
does not work as expected, result file is not readable.
Is there any tool like this which can be used to pipe output to a text file?
Best Answer
Since iftop-1.0pre3 (2014-01-01), a text output mode was added. This will be very useful to anyone trying to parse the output of iftop.
The command line option to activate text (batch) mode is:
When using text mode, the following options are available:
Use the
-h
option for help on iftop usage.Example usage would be:
If you want it to run in the background for 5 hours:
Check on background job with
job
command.