A small system monitor written in x86-64 assembly for Linux.
It shows basic CPU and memory usage by reading system data directly.
- Shows total, free, and used memory
- Shows CPU usage percentage
- Reads data from
/procand system calls - No libraries, just pure assembly
- Linux (64-bit)
- NASM
- ld (linker)
Install NASM:
# Ubuntu / Debian
sudo apt install nasm
# Arch
sudo pacman -S nasm
# Fedora
sudo dnf install nasmnasm -f elf64 monitor.asm -o monitor.o
ld -o monitor monitor.o
chmod +x monitorOr in one line:
nasm -f elf64 monitor.asm -o monitor.o && ld -o monitor monitor.o./monitorExample output:
Memory:
Total: 16384000 KB
Free: 8192000 KB
Used: 8192000 KB
CPU:
Usage: 35%
- Memory → uses
sysinfosyscall - CPU → reads
/proc/stat - Calculates usage from active vs idle time
- Runs once and exits (not live updating)
- Linux only
- Very small and fast
- Add a loop for live monitoring
- Add colors or better formatting
- Show more stats (disk, network, etc.)
Just a simple project to understand:
- assembly basics
- Linux syscalls
- how the system actually works under the hood