Network usage monitor

UUID: netusage@30yavash.com
Last edited:
5 months ago 2018-05-11, 17:58 UTC
Last commit: [c089c96f] netusage@30yavash.com fix issue 279 (#304)

Network usage monitor using vnstat

README

Close

Network Usage Desklet

What it does:

This applet keeps track of your Internet usage.

How it does it:

The vnstat daemon runs in the background and collects info about your Internet usage.

The applet detects which device you're currently using, and exports a graph using vnstati.

What you need for it to work:

You need:

  • To install vnstat
  • To install vnstati
  • To have the vnstat daemon running
  • To have vnstat configured for the devices you are using.

Note: In Linux Mint, you can simply run apt install vnstati and that will take care of everything for the built in devices. In other distributions it might depend on the way things are packaged but it's likely to be similar.

It is possible to add additional devices, for example a USB Mobile Internet stick. Running man vnstat will give some information on how to proceed but beware it is not trivial.

Use on Distributions other than Mint:

  • The original version assumed the NMClient and NetworkManager libraries were in use as is the case in Mint versions up to 18.3 and most other current distro versions.
  • The latest versions can also switch to the more recent NM library used on some recent distributions such as Fedora 27 and higher.
  • It is possible that you may have to set up vnstati on other distributions - running man vnstat will provide information on how to proceed if that is the case.

Contributors

  • The Desklet is based on an Applet by Clem.
  • The original Author of the Desklet was Siavash Salemi - 28 Sep 2013
  • Translation Support and bug fixes by NikoKrause
  • Network manager selection by Peter Curtis based on a technique by Jason Hicks

Log In To Comment!

9 Comments

Peter Curtis
Peter Curtis-3 months ago
I have tested it and it is in full time use under Mint 19.
hefti33
hefti33-8 months ago
I have a 4K display and therefore the data's are not readable (all figures are much to small). Is there any possibility to adapt the font size?
Peter Curtis
Peter Curtis-5 months ago
The Desklet works by displaying the output of the utility vnstati which creates an image. vnstati currently has no options to change font or image size that I can find. It might be possible to scale the whole image each time before it is displayed using a command line utility such as imagemagick. One would need to think about the overheads and timing, and preferably make the system calls asyncronous. I can give some hints if you want to try it out.
tikondrus
tikondrus-8 months ago
Does not work on Fedora 27. Cinnamon crashed.
Peter Curtis
Peter Curtis-5 months ago
This was the result of an update to the Network Manager in Fedora 27. The original version assumed the NMClient and NetworkManager libraries were in use as is the case in Mint versions up to 18.3 and most other current distro versions. I have added code to the latest version of this Desklet so it can switch to the more recent NM library used on some recent distributions such as Fedora 27. I have tested on a Fedora 27 LiveUSB but confirmation from a user of Fedora that the Desklet is fixed would be helpful
Fedora Tux
Fedora Tux-1 year ago
Not working in Fedora 26, also it would be nice to insert a transparency in the box!!!
Paul Miller
Paul Miller-11 months ago
I'm using fedora 26 myself and it seems to be working fine. Once you have vnstat and run it as a daemon. It took a while to start populating but you expect that given it is based on historical data.
Peter Curtis
Peter Curtis-1 year ago
Roy, Yes it is possible to set up to add additional network data monitoring in vnstat - I have done so on my applet, the Network Usage Monitor with Alerts which also has an option of displaying vnstati output and I put a little bit of information in the associated help file. In summary The system program vnstat is automatically set up when it is installed to monitor the network devices/interfaces installed in the machine at the time and it then keeps a log of hourly, daily and monthly network traffic by use of a daemon. It is definitely possible to add additional USB network devices and possibly bluetooth devices to the list of monitored interfaces at a latter stage and I have done so for USB devices. man vnstat in a terminal will give details but be warned, it is not trivial to do!
Roy Gilby
Roy Gilby-1 year ago
Many thanks. Your desklet works great. Are there any configuration files behind the scenes that would allow me to add additional network usage data to the desklet ?