A simple command-line-based Task Manager for Windows that allows users to list processes, terminate processes by PID, and monitor CPU & RAM usage.
- List all running processes along with their memory usage.
- Kill a process by entering its PID.
- Display real-time CPU and available RAM usage.
- Windows OS
- MinGW with psapi & pdh libraries or Microsoft Visual Studio
- g++ compiler (for MinGW)
- Clone this repository:
https://github.com/udaykiran2427/TaskManager-CLI.git cd TaskManager-CLI
- Compile the project using g++ (MinGW) or Visual Studio:
g++ -Iinclude src/main.cpp src/process.cpp src/system.cpp -o taskmgr.exe -std=c++20 -lpsapi -lpdh
Run the compiled executable:
./taskmgr.exe
- List Processes - Displays all running processes with their PID and memory usage.
- Kill a Process - Prompts for a PID and attempts to terminate the process.
- Show CPU & RAM Usage - Displays current CPU usage percentage and available RAM in MB.
- Exit - Exits the program.
- Requires administrator privileges to terminate certain processes.
- Uses Windows APIs such as
CreateToolhelp32Snapshot
andPdhOpenQueryW
for process monitoring.
MIT License.