5

There are lots of answers that show how to monitor network usage in Ubuntu 16.04, even per process using the nethogs package. However, my complaint with all those methods is that they are all command line, and require a terminal to remain open on my system doing the monitoring. Then there is also the total network usage in the System Monitor, but that is not per process.

Is there a way I can append another column to the System Monitor that will show me the total (cumulative) data used by each process since last reboot? Something similar to the Memory, or CPU used by a process, but for Internet data.

1
  • 2
    I don't have a rogue problem, or a network issue. It is just for my curiosity, and for learning. I am trying to find out if the System Monitor is flexible in that way.
    – Kartik
    Jan 13, 2018 at 6:17

2 Answers 2

4

System Monitor is maintained by Gnome.

This idea was reported to Gnome in 2007. They seem to have little interest in pursuing it. See the Gnome wishlist bug on this topic for their reasoning over the years.

Gnome is both open source and welcomes volunteer contributions, so if you are willing to hack at the gnome-system-monitor code, feel free! System Monitor does not have a "plug-in" or "extension" framework; feel free to add that, too.

2
2

I don't know of any GUI for your needs, but these could help with not keeping a terminal window open if you run a command-line tool:

  • You could set up crontab to start command-line tools up on OS startup.

  • Or you could start the command-line tool using nohup and then close the terminal :
    nohup <command-line tool> separates the command-line tool's process from the terminal process, stops it listening for interrupts, and changes the input and output streams as described here and here.

  • If the command-line tools do not have a repeat function -- i.e. they execute once then return

    • you can use crontab with a per-second/per-minute schedule rather than once-only --- it's "run every n seconds"
    • you can use while sleep <n-seconds>; do <command-line tool> ; done to repeat them indefinitely. Note that there will be an n-seconds gap between the end of one execution and the start of the next --- it's "run after n seconds delay" not "run every n seconds".

I'm currently learning the Matplotlib python library, and I've a feeling that a few hours with that and some (threaded?) python to watch for file changes on whatever files your command-line tool logs to you could produce a self-updating graphing application - depends how much curiosity you have :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .