The Network Usage Monitor Applet (NUMA)
The Network Usage Monitor Applet (NUMA) enables one to continuously display the speed and data usage on a selected interface. It is intended to make monitoring of mobile connections by USB Mobile Internet Dongles, through phones by bluetooth and by Mobile Wifi (MiFi) units easy to accomplish. To this end, a maximum data and easily changed Alert level can be set for the current connection. There are also a number of cumulative data monitors to track total usage with offsets and corrections as required. It builds on the Network Speed Monitor Applet project by adreadec.
For the basic facilities the
gir1.2-gtop-2.0library must be installed or the applet will not load. On both Mint and Ubuntu it can be installed by the synaptic package manager or with the terminal command:
sudo apt-get install gir1.2-gtop-2.0
- For full facilities including notifications, audible alerts and statistics the
gir1.2-gtop-2.0 vnstat vnstati zenity sox libsox-fmt-mp3libraries must be installed. On both Mint and Ubuntu they can be installed by the synaptic package manager or with the terminal command:
sudo apt-get install gir1.2-gtop-2.0 vnstat vnstati zenity sox libsox-fmt-mp3
- Cinnamon Version 1.8 or higher as it make comprehensive use of the new Cinnamon Settings Interface for Applets and Desklets.
- The Applet:
- Continuosusly displays Upload and Download rate in a fixed width 'steady' display
- The Applet Background colour is:
- Black when Current Interface not active
- Green when Current connection and interface has provided data
- Orange when the Alert level (as percentage of the Data Limit) has been exceeded
- Red when the Data Limit for the current connection has been exceeded
- Hover over Applet:
- Displays continuously updated Upload and Downoaded data usage for the current connection
- The Context Menu (Right Click):
- Displays all the interfaces managed by the Network Manager Applet
- Identifies any Active interfaces within Network Manager
- Allows the selection of the interface to be monitored from those manged by Network Manager.
- Allows the selection of an interfaces not managed by properly by Network Manager and/or interfaces for a connection initiated outside Network manager (ppp0 and bnep0). (bnep0 needs v20_2.6.0 or higher)
- Identifies the interface which has been selected for monitoring.
- Allows updating of the list of Network Manager Interfaces (eg after a dongle has been inserted or a bluetooth connection made)
- Enables the Cumulative Usage Monitors to be reset and the date and time of reset displayed.
- Provides links to:
- The NUMA Settings screen.
- The Gnome System Monitor
- Left Click Menu:
- Displays continuously updated Uploaded and Downloaded Data for the Monitored Interface.
- If Alerts are enabled:
- A slider to adjust the Alert level as a percentage of the Data Limit
- A display of the exact Alert level percentage and tthe Data Limit
- For each Interface where cumulative monitoring is enabled:
- The interface and Cumulative Usage
- A comment (entered in Settings) to remind one of when it was set/reset and the value when set/reset.
- The Settings Screen allows:
- Setting the Update Frequency (1 to 5 seconds)
- The Resolution of displayed upload and downloads (0 to 2 decimal places)
- Change the units for Data Limits and Cummulative Offsets between Mbytes or Gbytes
- Setting an interface to use as Default if no other interface is active at start-up - for Wifi hotspots and Mobile Broadband where the connection is manual.
- Enabling Alerts on the current monitored interface and setting the Data Limit for the current connection on that interface and
- setting the Alert Level as a percentage of the Data Limit by a slider (duplicated in the left click menu as it is frequently used.
- Enabling each of three Cumulative Usage Monitors Setting an offset for each Cumulative Usage Monitors (v20_2.6.0 or higher)
- Switching on a Long Term Statistics Display (Requires vnstat and vnstati to be installed)
- Enabling Actions when the Current Data Usage Limit is exceeded:
- Do nothing other than put up a standard Cinnamon Notification - this displays for 5 seconds or so and ends up in the notification tray - very easy to miss.
- Display a high priority Notification - this displays on to of other windows until you clear it but does not go into the notification tray - still easy to miss from a distance.
- Display a full screen Modal Dialog - this is techie term (look it up on Wikipedia) and the result is the whole screen is blacked out with an information box and button to clear it in the middle and uses the internal capabilities of Cinnamon. It is impossible to miss if you are at or close to the machine.
- Run a shell script which lives in the applet folder and is called alertScript - this can be customised by the user and the example plays a system sound file for 6 seconds (using Sox) , puts up a warning box using Zenity and sends a standard notification so you have a record in the notification tray.
- Suspend the Machine after a brief period during which you can abort. This is also implemented by a script (suspendScript) so the user can fine tune it but the version provided uses Zenity for the warning message which has a 30 second timeout to allow you to abort. Another message is put up before suspending which should be on display when you wake up the machine.
- Disable Networking for all connections managed by the Network Manager. This puts up a warning message and you can abort for a short period by clicking the Applet - not the OK button on the warning screen.
- Set a delay before disabling Network Connections Enable a warning sound
- Set the sound file to be played
- Add or hide the Advanced functions from Housekeeping drop down menu
The display width, justification and font details are set using an external Cascading Style Sheet (.css) file which is in the main folder (usualy
The settings in this css file govern the width of the Applet and the font. Changes may be required with some themes to avoid the display width being exceeded which leads to jitter with high network speeds and resolutions or to allow a reduced size width to save panel space. The latest version also allow the backgrounds to be configured using this css file to optimise to a particular theme although the defaults work well on most popular themes.
The applet is based on a well tried core from the netspeed applet and has been tested on various systems initially running Ubuntu 12.04 and Mint 15 with a variety of themes. It has been tested using Cinnamon 1.8, - 3.2 and had minor modifications for the changes introduced in Mint 18. The current Version has been tested with Cinnamon 2.2 - 3.2 and Mint 16 - 18.1
- Download from Cinnamon Spices
- Unzip and extract folder netusagemonitor@pdcurtis to ~/.local/share/cinnamon/applets/
- Install any additional programs required.
- Enable the applet in Cinnamon Settings -> Applets
- You can also access the Settings Screen from Cinnamon Settings -> Applets
Version information prior to the changes introduced by the new Cinnamon Spices Web site in January 2017
There is a full change log in the applet folder called changelog.txt which can also be accessed through the Context (Right Click) menu in the Housekeeping sub-menu. The earlier development was carried out on Github along with my other applets at github.com/pdcurtis/cinnamon-applets
Please let me know if you have any problems.
Please also take the time to rate applets - it is important both for new users and to motivate applet writers!
Btw...the github version seems old to me cause the last commit are 3 years ago....?
I confirm what @jessy said. I've got the same problem on a fresh installation of Linux Mint 18.
I solved by manually installing your applet.
Your zip doesn't extract correctly, but I was able to fix it. This is a working zip:
Side note...previous version worked just fine and also i already uninstall the previous version before trying to install the latest as recommended by you...cheers
Linux Mint 18 Sarah (Cinnamon)....
in linux mint 17.3 .
I can't install and get the error:
[errno 20] is no folder: '/tmp/tmph78gkH/netusagemonitor@pdcurtis/vnstatimage.png
I have previously installed a previous version and then all was good.
But i had to reinstall Linux mint 17.3 completely en now i get this error.
Can you help me?
The current version has been initially checked with Mint 18 and Cinnamon 3.0 and works without major problems excepting the option of Suspending the machine when the data limit is exceeded which does not work. This results from the change in Mint 18 from use of upstart to systemd for system calls and initiation. You may also need to install gedit which has been replaced by xed in Mint 18 to view the change log and some other advanced files from the Right Click Menu.
I will issue an update after further testing but in the meantime it only involves changes to a single line in a script re-enable the suspend function. It has always been intended that the file should be edited by the user to fine tune their requirements. The change is only required if you use the Suspend feature.
If you want to make the change the file can be accessed from the Right Click -> Housekeeping and System Sub Menu -> Open Suspend Script (This needs the 'Add Development and Test Functions to Context Menu' box to be ticked in the Configuration Screen).
You should now have have a file open in an edit window and you should add/edit the lines starting at circa 32 to from
# Suspend via dbus
dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend
# Suspend via systemctl in Mint 18
Note some of the lines may be wrapped if you use a narrow editor window
The really keen user can also search for all the occurrences of gedit and change to xed in applet.js
to avoid installing gedit!
Thank you for all the effort you've put into this applet.
2) I try change the background of applet with stylesheet.css, but take no effect. (I would like to eliminate the green background)
I registered just to say thank you for this great applet!
I use it in all my laptops.
Thank you again!
The workround for the segfault problem in cinnamon and nemo has been effective and I have not had any instances in the last 2 months and none have been reported. Hopefully the underlying problem in Mint 17/Ubuntu Trusty has been solved in any case.
@Brahim There is still the file called stylesheet.css that I added 8 months ago in response to your first request. It can also be accessed from the right click menu in the Housekeeping and System drop down menu once you have enabled Add development and Test Functions to the menu on the settings screen. Remember that an update will overwrite your changes so back them up. The default colours are transparent so they work on dark and light themes equally well. I use the void theme on most of my machines.
So the change I am implementing will automatically select the first active interface at start-up But Only If no default interface was specified in 'settings' and not if the last interface was PPP0. I hope this removes the needs for any additional configuration boxes in 'settings', it is already complex enough.
@Brahim I believe this will mean it will work immediately for every user on Wifi or Ethernet whilst maintaining additional flexibility for more sophisticated use.
I like to test for a period before uploading so expect it to be available for download here in one to two weeks.
The problem seems to be in the cinnamon-settings API or more likely the system functions the cinnamon-settings API calls as it only occurs in Mint 16 systems and has only been reported on the latest very fast machines. The NUMA applet saves the cumulative data totals using cinnamon-settings (ultimately in a file) to give persistence across cinnamon resets and suspends, restarts etc and on very rare occasions this call causes a segfault. I have duplicated this in a test applet and separating the 'write' calls to the API in time and using internal variables for the rest of the time seems to fix it. This appears to be a viable work around until the underlying problem is fixed and I have not seen any segfaults for nearly 7 days of running time.
The latest version v20_2.3.17 has every workaround for the problem I can think of on the assumption it is a 'race condition' somewhere in Mint 16 - the 'write' calls to the API are now separated by half the repetition cycle from any other calls! If any users still sees a segfault PLEASE report it. Note - It only occurs when cumulative data monitoring is enabled by a user which is not the default in the latest versions.
I will post any news as soon as i have it.
Thumbs up sir!
A combied Download and Upload would be quite easy to do - I think the separate speeds are very useful but I could make a half size applet option with a combined upload and download for small screens, maybe cut back on the KB/s text a bit as well. Give me a couple of days for a trial. You may even be able to edit the .js file yourself
I am also working on an option to display vnStat output to provide daily and monthly output as per Clem's Netspeed Usage Monitor.
You can see the latest developments at www.pcurtis.com/spices.htm#numa where I plan to keep a development version available for download - Use with Caution as it will not be stable and may suffer regressions
Could you please have an option to combine Download and Upload speeds.
It would be looking more compact and simpler to read.