Features And Basic Details
This plugin is a port of the venerable GNOME 2 Hardware Monitor to XFCE4 (originally written by Ole Laursen), so that I could get at a network bandwidth graph. It can display various system stats (CPU, filesystem and network usage among others) in graphs, visualisations or with text.
Original GNOME 2's applet page: So far no major changes have been made (most of it has been reproduced here).
README: Requirements for running, important issues to be aware about.
ChangeLog: Detailed changes and important notices between the versions.
Officially packaged in distros (note my own Debian packages above, email me (OmegaPhil@startmail.com) if you know of more): Arch, Fedora
For those interested, here are build instructions from Sal:
'In addition to the build libraries (libglademm, etc) from the Nux Dextop repo, the configure line had to specify the library path that this xfce install prefers:
./configure –prefix=/usr –libdir=/usr/lib64/ (and of course make/make install)'
Source: Browsable git repo also with archives of tagged source for downloading specific releases (although presumably you'll get this through your package manager along with XFCE4 at some point).
I now have one tester, with a few confirmed users, so in general it seems to be going its job.
Temperature and fan speed monitors have not been tested by me, if people are willing to test this, please open a bug and I can look into it.
My day to day configuration and testing is based solely on a simple network bandwidth graph (I wanted something approaching NetMeter after I graduated from Windows long ago).
I welcome and am happy to fight bug reports here.
The plugin supports various viewers which you can switch between easily (all are animated smoothly):
- A graphical view where each monitor is represented by a (time, measurement) colored curve with optional text value overlay
- A bar-plot view with a horizontal or vertical bar per monitor
- A column view with a column (time, measurement) diagram for each monitor
- A textual view which simply lists the monitors and the currently measured values
- A flame view which produces spiffy flames, the sizes of which are determined by the values of the monitored device
And the plugin supports monitoring the following hardware characteristics:
- CPU usage (all CPUs, or one at the time) - low-priority background processes such as SETI@home are automatically ignored
- Memory usage - cache and buffers are automatically ignored
- Swap usage
- Load average
- Disk usage (or disk space free)
- Disk statistics (anything from '/proc/diskstats')
- Network throughput (Ethernet, wireless, modem, serial link), either incoming or outgoing or both
- Temperatures from internal sensors (e.g. system board and CPU temperatures)
- Fan speeds from internal sensors
- Any number that can be read straight or via a regex from a file via the Generic Monitor
To avoid eating CPU time when it is scarce, the plugin lowers its priority.
Firstly, add the Hardware Monitor plugin to a panel by right-clicking on the panel → Add New Items… → locating the plugin in the available selection:
By default you end up with an 'All processors' CPU monitor with the curve visualisation in the panel:
Configuration Of The Device You Are Monitoring
Right-click anywhere on the visualisation → Properties brings you to the Hardware Monitor Preferences dialog, and the Devices tab. Here you can add, remove and change 'devices' (monitors/data sources) that will be displayed together in the visualisation (to have more than one visualisation in a panel, add additional plugin instances).
In this example, the colour button has been pressed (see underneath the devices list) and the GTK colour picker dialog has appeared. Here you can set the precise colour for the selected device in the list's data to appear as in the visualisation (applies immediately).
Remove the current monitored device and press the Add button:
Here you see the System tab, showing the default 'All CPUs' CPU usage monitor to add. You can also pick an individual CPU here, then add more and more 'devices' to track other CPUs if desired. 'Tags' are short descriptive words intended to be displayed along with the relevant device data in the optional text overlay for the Curve visualisation (basically the standard graph).
Load average is the current system load.
With the Disk usage monitor, paste/type the path of a directory on the filesystem you want to see the used space for, using the 'Show free space' checkbox to report on free space instead.
Disk statistics reports on all disk/device stats available from '/proc/diskstats' - note that the raw numbers aren't reported (that would just result in very large ever-increasing numbers over time), but the rate of increase per second, with the exception of 'Number of I/Os in progress'.
Memory usage reports on the amount of RAM used (minus buffers) and swap reports on the amount of swap space used.
By default the first ethernet connection is selected, with the 'All data' direction reporting the sum of data transferred into and out of the interface. The second screenshot displays the various interface 'types' this plugin supports.
Direction allows you to report on the sum of all traffic, or just in one particular direction.
If you expand the Advanced section:
This is a major new feature for v1.4.7 - actual interface names are no longer hardcoded based on their 'type' (e.g. 'Ethernet (first)' was always 'eth0') - you can now enter whatever you want in for each interface name, again with the intention that the interface will be available later if it isn't currently (you will get a warning if the interface isn't detected to make sure you want to go ahead anyway). Along with dealing with examples of many instances of a particular type of interface, this also allows supporting distros that have started to break away from UNIX traditional interface naming.
As an extreme example, with this functionality you could configure 8 wireless interfaces if you wanted, albeit with the wrong interface type names displayed (to get at more, use more than one instance of the Hardware Monitor plugin - configuration is separate).
To edit an interface name, single-click the name and enter - note that this change applies immediately to all network monitors associated with the current plugin instance. Use the 'Restore Defaults' button to return to the original configuration.
These montiors are not used by me and have not been tested. If you want to see this functionality work and are willing to test, as mentioned earlier please raise a bug and I'll see what I can do.
The Generic Monitor is an advanced monitor to allow power users to effectively visualise/plot any data source they want, if they can turn it into a number and put it in a plain text file (in true UNIX fashion). The intention is for the user to regularly output data (via a script) to a file (optionally on a RAM filesystem to avoid pointless I/O on a real device, e.g. under '/run/shm' on Debian), and this monitor read the single value and plot.
Keep in mind that:
- The visualisation/graph area available is rather small
- Positive axes available only
- The y axis is a complete scale - so plotting very large numbers that change little will be a bit pointless as the line will be stuck at the top of the graphing area and will apparently not change
If enough people are interested, I can extend how the values are processed (e.g. values passed through a basic calculation like '* 10', '/ 1000' etc) to make it a bit more flexible, please make a feature request.
For basic usage, you would specify a file which contains a single line with just a number (including the the usual newline at the end) - this is 'Number from entire contents'.
When the source file isn't tailored for the monitor, superfluous text will be present, so you'll need to use a regex to extract the number with a capture group (tutorial site) - the Perl Compatible Regular Expressions engine is used, for detailed information see 'Detailed Description' in the glibmm documentation (which is at version 2.48.1 at the time of writing, you may need to edit the URL for later versions).
Select the 'Number from regex' radio button, and put the regex in 'Regex to use'.
Usually the first line of contents are extracted from, with the rest ignored - so as a basic (and pointless) example, the following is intended to extract the first device's major number from '/proc/diskstats':
If you are following a number that doesn't change much (worse still, a large number), rather than plotting it raw, you might be interested in the 'Follow change in value' option - you can then plot how the value changes over time, i.e. the difference between the current value and the one recorded on the last check.
Since the visualisation/graph area only implements a positive y axis, plotting of change is a bit limited - 'Positive change' will plot the value of the change only when a number goes up, 'Negative change' when it goes down, and 'Both' will basically plot the absolute change in value whether it goes up or down.
For example, with Positive/negative change, the following will happen:
|Measured Value||Previous Value||Change||Plotted Result - Positive||Plotted Result - Negative|
and equivalent for 'Both' etc.
'Data source name (long)' is used for the name of the Monitor, and the short version is used for the tooltip etc.
Units are optional and are appended to the reported value in the usual places, and the Tag works as described for earlier monitors.
Changing A Monitor
Back on the Devices tab of the Preferences dialog, the Change button allows you to change an already-present monitor using the 'Choose a Device' dialog previously discussed. Most changes require pressing OK to submit, the exception is the Network monitor advanced interface name mapping which updates immediately as mentioned earlier.
Monitor data is collected together and displayed in a visualisation - this is configured in the Hardware Monitor Preferences dialog, Viewer tab.
Any changes you make on this tab apply and are saved immediately (in the case of text entries, when the entry loses focus).
The following shows an example of the most featureful visualisation (as of v1.4.7), the Curve view (selected under Viewer):
The example displays two curves, incoming and outgoing data on my main ethernet interface, along with a text overlay reporting the graph maximum and the actual values from the monitors.
The curve visualisation/graph scales in realtime to keep the maximum value visible/unclipped from the monitor history, which corresponds to the length of the visualisation.
The size control allows you to shorten or lengthen the width of the visualisation.
When you enable the text overlay, you can get at the maximum value of the graph (the units of which are taken from the first monitor displayed), along with a summary of reported values from the contained monitors along with their associated tags (so you can tell where the particular values come from) - the precise text is configurable by you in the format string:
%M: Monitor values (full)
%m: Monitor values (compact - no spaces, shorter units)
%A: Graph max (full)
%a: Graph max (compact - no spaces, shorter units)
The idea is to include monitors associated with the same type of source together. As the output can get long quickly, there is a compact mode, the difference demonstrated in the above screenshots.
It isn't obvious, but the configured monitor value separator is a single space - in the full mode, this string is used to separate values from tags, and between separate monitor outputs, and in the compact mode tags are right up against values so it just affects the output between monitors.
The font used is fully configurable via the usual GTK font picker, colour works as with the previous colour picker - unfortunately the output text can only be in a single colour currently.
Text position allows you to place the text as desired:
I use the 'Bottom center' option.
Horizontal Bars View
The only thing configurable here is the visualisation size (width) - works the same as before.
Vertical Bars View
In this view you can configure the font via a GTK font picker in the usual manner.
Finally, the Background tab:
The normal panel background or a user-defined colour can be provided via the usual GTK colour picker.
The following is reproduced from the original applet screenshots page:
A screenshot of all views monitoring CPU and network usage:
To the left the curve viewer (all-round), then the bar viewer (best for disk/memory usage actually), then the cool flame viewer (for l33tn3z effect) and finally the text viewer. The five instances were made by adding the plugin four times to the panel - of course, in the normal case you would only have one or two instances running. No matter what, only one process is actually running, though, so it will not eat too many resources.
The flame effect is really best seen real-time - however, here's how it looks like when you let it monitor an Ethernet card (pink) and the CPU usage (blue). Notice the small sparks.
To the right a program's being compiled.
Adding a new monitor in another setup:
The devices preferences:
In general, the plugin tries to figure out the best setup itself so that you don't have to waste time configuring everything. This makes it possible to reduce the UI clutter, and it is also more challenging and fun to program (OmegaPhil: original author's words, not mine :p).
A nice screenshot from Ian Langworth:
Starting at left: sensors (CPU, motherboard, CPU fan), disk, CPU usage, net receiving, net transmitting. The rx/tx is from Gnome Network Monitor.
If you have a more interesting or exciting setup, please send a screenshot to me (OmegaPhil@startmail.com) so that it may end up here in the hall of fame.