An implementation of a task manager in C++ that lists and manages processes on Windows and Linux platforms.
This project provides a simple task manager that can display and manage processes. It includes functionality to list processes, sort them by name, PID, and memory usage, and retrieve detailed process information depending on the operating system.
cmake-build-debug/
: Build directory.CMakeLists.txt
: CMake configuration file.Task Manager.cpp
: Main source file containing the implementation of the task manager.
To compile and run the task manager:
- Ensure you have C++ compiler and CMake installed.
- Clone the repository.
- Navigate to the repository directory and create a build directory:
mkdir build cd build
- Generate the build system using CMake:
cmake ..
- Build the project:
cmake --build .
- Run the executable:
./Task Manager
- List processes and display basic information.
- Sort processes by name, PID, and memory usage.
- Retrieve and display detailed process information based on the operating system (windows or linux).
Here's a snippet of example output from the task manager:
Unsorted List:
Name : cProcess1 PID : 1234 MemoryUsage : 1024 k
Name : bProcess2 PID : 5678 MemoryUsage : 208 k
Name : aProcess3 PID : 11 MemoryUsage : 4096 k
Sorted by Name:
Name : aProcess3 PID : 11 MemoryUsage : 4096 k
Name : bProcess2 PID : 5678 MemoryUsage : 208 k
Name : cProcess1 PID : 1234 MemoryUsage : 1024 k
Sorted by PID:
Name : aProcess3 PID : 11 MemoryUsage : 4096 k
Name : cProcess1 PID : 1234 MemoryUsage : 1024 k
Name : bProcess2 PID : 5678 MemoryUsage : 208 k
Sorted by Memory Usage:
Name : bProcess2 PID : 5678 MemoryUsage : 208 k
Name : cProcess1 PID : 1234 MemoryUsage : 1024 k
Name : aProcess3 PID : 11 MemoryUsage : 4096 k
or write file name and will output your task manager in it.
For questions or feedback regarding the Task Manager by CPP, feel free to contact the author:
- Email: [email protected]
- GitHub Issues: Project Issues