Overview
CPU Load is an Ada library that reports the CPU load of the system, of a specific process by its ID, or of a specific application by its name (meaning every one of its processes running when a sample is taken). It gives one simple interface: take a sample, wait, take another, and compare the two.
CPU Load is part of the Joular project.
It compiles to native code with minimal overhead, and also provides a C interface, so it can be used from any language with a C FFI (C, C++, Java, Python, Rust, etc.).
CPU Load is the library PowerJoular uses to measure the CPU load, alongside Joular Core for the hardware.
Key Features
- Measure the CPU load of the whole system, of one process by its ID, or of an application by its name (every process of it)
- Measure on Linux, Windows, macOS (Apple Silicon and Intel Macs) and FreeBSD
- Match an application with the program its processes actually run, so
firefoxfinds every process of Firefox - Give every load as a share of the whole machine, from 0.0 to 1.0
- Tell apart a process that could not be read (a negative load) from one that used no CPU time (0.0)
- Keep no state: a sample is a plain record, so it can be taken in one thread and compared in another
- Read the counters with no particular rights (except for the processes of other users on macOS and Windows)
- Static library for Ada programs, and a shared library with a C interface for other languages (one self-contained file on Linux, Windows and FreeBSD)
License
CPU Load is licensed under the GNU LGPL 3 license only (LGPL-3.0-only).
Copyright © 2026, Adel Noureddine.
All rights reserved. This program and the accompanying materials are made available under the terms of the GNU Lesser General Public License v3.0 only (LGPL-3.0-only).
Author: Adel Noureddine