This is a simple CPU usage monitor application that reports CPU usage per core as well as average usage by,
parsing data from /proc/stat.
The application prints the CPU usage per core in colored text to the terminal using ANSI escape codes. If the usage is less than 50% it will be displayed in green, otherwise it will be red.
It's written fully in C and should compile fine on any Linux distribution.
I ran sha256sum < /dev/urandom on one terminal to see the CPU usage spike in action.
- You should have the
/proc/filesystem mounted. Normally it's mounted by default. - The application should have permission to read the file:
/proc/stat. - You should have GCC C compiler installed. If you use a different compiler please edit the Makefile to make the compilation work.
-
First clone the project:
git clone https://github.com/aravinda333/CPU-Performance-Monitor-Linux.git
-
cdto the directory:cd CPU-Performance-Monitor-Linux -
Run
maketo build the executable. -
Run the executable:
./cpu-perfmon
Thankyou everyone for testing this out!
If you loved this project, please consider sending a donation:

