A system utility that provides a comprehensive view of running processes on a computer. The application displays real-time information about CPU usage, memory consumption, and other relevant metrics for each process, allowing users to monitor system performance, identify resource-intensive tasks, and terminate problematic ones.
Developed as part of Programming Fundamentals course at NUP 2025.
This project follows the K&R (Kernighan and Ritchie) coding style.
-
Real-Time Process Monitoring
- Description: Displays all running processes in real time with key metrics such as CPU usage, memory consumption, process ID (PID), process name, and user.
-
Text-Based User Interface (TUI)
- Description: Provides a terminal-based interface for interacting with processes, including navigation, viewing details, and performing actions.
-
Process Sorting and Filtering
- Description: Enables users to sort and filter processes to quickly find specific tasks or analyze resource usage patterns.
All functions are documented using Doxygen docstring format.
Build & Runtime:
- gcc - GNU C Compiler
- make - Build automation tool
- libncurses5-dev / libncursesw5-dev - TUI library
Testing:
- libcriterion-dev - Unit testing framework
- valgrind - Memory leak detection
- lcov - Code coverage HTML reports
- Clone the repository:
git clone https://github.com/programming-fundamentals-nup-2025/examproject2-Tacitus-SL
cd examproject2-Tacitus-SL.git- Install dependencies:
make install_deps- Build the project:
make- Run the process browser:
./pbRun all tests:
make testThis command executes:
- Unit tests (Criterion framework)
- Valgrind leak check (ensures zero memory leaks)
- Smoke test (verifies TUI launches without crashes)
- Coverage report (generates HTML report in
coverage_report/)
View coverage report:
xdg-open coverage_report/index.htmlNavigation:
↑/↓- Move selection up/downq- Quit application
Sorting:
p- Sort by Process ID (PID)n- Sort by process Name (alphabetical)m- Sort by Memory usage (descending)c- Sort by CPU usage (descending)
Actions:
/- Enter search/filter modeESC- Clear filter (or exit search mode)k- Kill selected process (shows confirmation)Y/N- Confirm/Cancel kill operation
Install to /usr/local/bin:
sudo make installUninstall:
sudo make uninstall.
├── src/
│ ├── main.c # Entry point and main event loop
│ ├── proc.c/proc.h # Process data collection from /proc
│ ├── sort.c/sort.h # Sorting logic (PID, name, memory, CPU)
│ └── ui.c/ui.h # TUI interface (ncurses)
├── tests/
│ └── test.c # Criterion unit tests
├── Makefile # Build system
├── README.md
└── .gitignore