procmon is a Linux host telemetry and process-monitoring tool written in C++17 with ncurses.
It provides a real-time terminal dashboard powered directly by /proc, with process-level CPU and
memory analytics, fast filtering, and lightweight suspicious-process tagging for defensive workflows.
This project demonstrates systems programming and host visibility fundamentals used in security, incident response, and endpoint defense:
- Parsing live telemetry from Linux kernel-exposed interfaces (
/proc/stat,/proc/meminfo,/proc/<pid>/*) - Building a responsive low-level TUI in C++ with no heavy framework
- Implementing resource accounting and process triage heuristics
- Designing for operational usage (sorting, filtering, rapid scanning, low overhead)
- Real-time host metrics:
- total CPU utilization
- total memory utilization
- Real-time process table:
- PID
- state
- CPU %
- memory %
- suspicious tag
- command
- Interactive controls:
qquitcsort by CPU %msort by memory %psort by PID- typing applies a live substring filter on PID/command
- backspace edits filter
- Defensive tagging heuristics:
TMP_EXECfor commands launched from temp/shared-memory pathsLOLBINfor common command-line patterns associated with living-off-the-land behaviorSPIKEfor very high CPU processes
- Collects per-process telemetry from
/proc/<pid>/stat,/proc/<pid>/status,/proc/<pid>/cmdline, and/proc/<pid>/comm - Computes:
- process CPU% (normalized against elapsed process lifetime and logical CPU count)
- process memory% (RSS relative to host
MemTotal)
- Exposes process state and suspicion tag for UI rendering
- Enumerates numeric process directories under
/proc - Produces process objects for the UI pipeline
- Computes host CPU% using delta sampling of
/proc/stat - Computes host memory% from
/proc/meminfo
- Renders a high-frequency ncurses dashboard
- Applies interactive sort/filter operations
- Supports immediate keyboard control with non-blocking input
- Linux
g++with C++17 supportmakencursesdevelopment headers
Arch:
sudo pacman -S base-devel ncursesDebian/Ubuntu:
sudo apt update
sudo apt install build-essential libncurses5-devFedora:
sudo dnf install gcc-c++ make ncurses-develmake./procmon- Rapid endpoint triage during suspicious host activity
- Identifying outlier CPU/memory consumers
- Spotting potentially risky execution locations (for example
/tmpand/dev/shm) - Quick first-look process review before deeper tooling (EDR, audit logs, memory forensics)
Current version is intentionally lightweight and local-only. Candidate next steps:
- Parent/child process tree view
- User/UID display and privilege-awareness indicators
- Signal actions from UI (
SIGTERM,SIGKILL) with confirmations - Export snapshots (JSON/CSV) for incident documentation
- Unit tests around parser logic with fixture-based
/procsamples - CI and packaging
- Built a Linux host telemetry monitor in C++17 that parses live
/procdata and renders a responsive ncurses dashboard. - Implemented process and host resource analytics (CPU/memory), interactive sort/filter controls, and suspicious process tagging heuristics for defensive triage.
- Designed a low-overhead, terminal-native monitoring workflow aligned with SOC/IR-style endpoint analysis.
procmon/
├── src/
│ ├── main.cpp
│ ├── process.cpp
│ ├── process.h
│ ├── system.cpp
│ ├── system.h
│ ├── ui.cpp
│ └── ui.h
├── Makefile
└── README.md
MIT (see LICENSE).