A Linux system monitor application built with C++ that displays real-time system information similar to htop. This project is part of the Udacity C++ Nanodegree Program.
This system monitor displays:
- System information (OS, Kernel version, CPU, Memory, Uptime)
- CPU utilization
- Memory usage
- Running processes with their CPU/Memory usage, uptime, and command
- Real-time updates using ncurses display
- cmake >= 2.6
- All OSes: click here for installation instructions
- make >= 4.1 (Linux)
- Linux:
sudo apt-get install build-essential
- Linux:
- gcc/g++ >= 5.4
- Linux:
sudo apt-get install build-essential
- Linux:
- ncurses
- Linux:
sudo apt-get install libncurses5-dev libncursesw5-dev
- Linux:
- Clone this repository
- Make a build directory:
mkdir build && cd build - Compile:
cmake .. && make - Alternative: Use the Makefile directly:
make build
- After building, run the executable:
Or using the Makefile:
./build/monitor
make run
.
├── include/ # Header files
│ ├── format.h # Time formatting utilities
│ ├── linux_parser.h # Linux system parsing functions
│ ├── ncurses_display.h # Display interface
│ ├── process.h # Process class
│ ├── processor.h # Processor class
│ └── system.h # System class
├── src/ # Source files
│ ├── format.cpp
│ ├── linux_parser.cpp
│ ├── main.cpp
│ ├── ncurses_display.cpp
│ ├── process.cpp
│ ├── processor.cpp
│ └── system.cpp
├── CMakeLists.txt # CMake configuration
├── Makefile # Build automation
└── README.md
- System: Main class that aggregates system information
- Processor: Handles CPU utilization calculations
- Process: Represents individual processes with their metrics
- LinuxParser: Parses
/procfilesystem for system information - NCursesDisplay: Provides terminal-based UI using ncurses
- Format: Utility functions for formatting time and other data
- Uses C++17 standard
- Reads from Linux
/procfilesystem for system information - Compiles with
-Wall -Wextraflags for strict error checking - Real-time display updates using ncurses library
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2019 Udacity

