Neo_78 wrote: Sun Apr 03, 2022 1:43 pm
Most command line based network tools in Linux only allow you to monitor network activities in real time and do not create a log file for later analysis.
Is there a tool that allows you to create and save a visual diagram (graph format) of incoming and outgoing network traffic and a text based log for later analysis?
Something comparable to the diagrams and data you would find on many routers, just directly in Linux and without having to install a complex server / client model with a database?
For interface wlan0 (alternatively eth0 ... whatever) bmon supports something like ..
Code: Select all
bmon -p 'wlan0' -o 'ascii:diagram=graphical history diagram;quitafter=10' >netactivitylog
that runs for 60 seconds (quitafter). Can also be set to record textual details instead ...etc. (see bmon manual page). That would be a large file however if scipted/looped, piping through zip would help (... quitafter=60 | gzip - >netactivitylog.gz) ... around a 7K zip file per minute record.
With a loop every minute and timestamp type filename you'd have all of the graphs for each minute and tail'ing out the last chart from each provides down to minute granularity in around 10MB/day combined files. With daily processing/condensing those, just a few MB/day in compressed form.