HTOP Replica in C++ for Unix Systems
Thursday, July 23, 2020
Basically a system monitor in C++ for Linux, like HTOP. I used nCurses, Parser and a few extra external libraries to get this running, you should already have these in your system.
ncurses
ncurses is a library that facilitates text-based graphical output in the terminal. This project relies on ncurses for display output.
Install ncurses within your own Linux environment: sudo apt install libncurses5-dev libncursesw5-dev
Make
This project uses Make. The Makefile has four targets:
build
compiles the source code and generates an executableformat
applies ClangFormat to style the source codedebug
compiles the source code and generates an executable, including debugging symbolsclean
deletes thebuild/
directory, including all of the build artifacts
Build Instructions
-
Clone the project repository:
git clone https://github.com/abhinavmir/htop-cpp
andcd htop-cpp
-
Build the project:
make build
-
Run the resulting executable:
./build/monitor
-
Add binaries to path if you want, and then you can access via
monitor
[From the Udacity’s C++ Nanodegree]