GuardProtect is a lightweight system monitoring tool written in pure C, designed as a simple analog of the classic ps aux command — but with a twist!
It reads process information directly from the Linux virtual filesystem /proc/, builds a hash table of processes, and can also print them as a hierarchical tree.
- 📊 List all processes — similar to
ps aux - 🌳 Display process tree — shows parent/child relationships
- ⚙️ Inspect a single process — by specifying its PID
- 💾 Uses
/proc/virtual filesystem — no external dependencies - ⚡ Efficient data access using a custom hash table
- 🧠 Written entirely in C — for educational clarity and performance
/proc/ is a virtual filesystem in Linux that exposes kernel data structures.
Each process has a folder /proc/<PID> containing files like:
/proc/<PID>/stat– basic process info/proc/<PID>/status– readable process metadata/proc/<PID>/cmdline– command used to start the process
GuardProtect parses this data and builds internal structures representing each process.
Internally: