A Linux process inspection tool that reads the /proc filesystem to display a process's memory layout and basic status information. Written in C++.
Given a PID, the tool prints:
- Process information (from
/proc/<pid>/status) — name, PID, state, thread count - Memory layout (from
/proc/<pid>/maps) — every mapped region with:- Start and end addresses
- Size in KB
- Permissions
- Section classification
| Section | Detected when |
|---|---|
HEAP |
Region is [heap] |
STACK |
Region is [stack] |
VDSO |
Region is [vdso] |
VVAR |
Region is [vvar] |
TEXT |
Executable permissions (x) |
DATA |
Writable but not executable (w) |
OTHER |
Everything else |
- Linux (
/procis required) g++(C++17) andmake
makeProduces the main binary.
./mainYou will be prompted for a PID:
--------------- Kundan Process Inspector --------------
Enter PID of a process that you want to inspect
make cleanEnter PID of a process that you want to inspect
1234
--------------------------------------------------------
------------------ Process Information -----------------
--------------------------------------------------------
Name: sshd
Pid: 1234
State: S (sleeping)
Threads: 1
--------------------------------------------------------
--------------------------------------------------------
-------------------- Memory Layout ---------------------
--------------------------------------------------------
----- Header -----
559a1... 559a2... 133 /usr/bin/sshd TEXT
...
--------------------------------------------------------
Reading a process you do not own requires root (or the process must be yours). Non-readable processes will produce an "Unable to open file" message.