About CPU monitoring tools for Linux
This tools monitors CPU activity of a multi-core machine. This tools provides effective load report useful for debugging real-time software on common Posix operating system (tested on various OS such as Linux, FreeBSD and NetBSD).
Calibration process (usually on last core) can be done at start to obtain accurate measurements on non hyperthread CPU. However, calibration index is refine during all the program life time and store in a file (usually /var/lib/cpumon/calibration.txt on Linux or /var/cpumon/calibration.txt on *BSD systems) when exiting. Be careful that calibration will report bogus index on hyperthread CPU because of non homogeneous core speed. Then, a measurement process is launch on each core to estimate effective load and report this measure to a monitoring process assign to a specific core (first core). Consolidate measurement reports are displayed every 5 seconds.
Calibration
Calibration process is done if no calibration file exists, if calibration file contains unexpected value or if it force by user wishes. Calibration process need to schedule high priority real-time process to get accurate result on loaded computer; if cpumon is not owned by root, a degraded calibration is done instead. Anyway, calibration index is refined during every cycle. At the end, on user interrupt signal (ie Control-C), calibration index is be saved again.
Limits
Calibration process report bogus index on hyperthread processors, pleased avoid it when if the calculus convergence is slower.
No support for clock throttling CPU speed.
On NetBSD, bias could be close to 10% on certain (sic) load configuration.
On *BSD systems, pthread_setaffinity_np requires privileges. Only on NetBSD, ordinary users can be allowed to control CPU affinity via the security.models.extensions.user_set_cpu_affinity sysctl. On FreeBSD, one needs to be root to monitor CPU load.
Ports
Cpumon has been ported (or tried to be ported) on:
- Debian Linux i386 6.0.8
- Debian Linux i386 10.7
- Debian Linux amd64 7.3
- Debian Linux amd64 12.5
- FreeBSD i386 8.2
- FreeBSD amd64 9.2
- FreeBSD i386 9.2
- Haiku i586 1-alpha4 (missing API)
- NetBSD amd64 6.1.2
- NetBSD i386 6.1.2
- OpenBSD amd64 5.4 (missing API)
- Syllable i586 0.6.7 (not functionnal)
- Ubuntu i686 10.04
- Ubuntu amd64 12.10
Screen-shot
Shell view
Downloads
Source packages
Debian packages
Requirements
To compile this tools, nothing special is needed, only a C compiler on a Linux system.
To install, one only needs to
- unpack the archive,
- do './do_makefile.sh' to select correct makefile,
- do a 'make to build cpumon and load tools,
- and a 'make install'.
Changelogs
CRG 2.6 (Thu, 28 Mar 2024 07:20:25 +0100)
- fixes from gcc 12 compilation warnings
CRG 2.4 (Sun, 16 Feb 2014 13:23:21 +0100)
- support for laptop variable clock speed
- handle multiple OSes and multiple make versions auto-magically
- tentative port of Syllable
- port on NetBSD
- port on FreeBSD
- remove dependency to /proc/cpuinfo
- fix bogus calibration
Cpumon 2.2 (Wed, 18 Dec 2013 00:38:24 +0100)
- support for hyperthread CPU
- new option to limit monitoring duration
Cpumon 2.0 (Sat, 16 Nov 2013 18:44:26 +0200)
- create a website and a Freecode entry
- do Debian packaging
- add a load program for validation
- first public release
- complete rewrite (clean and simplify)