Ever wondered what's actually running behind the scenes on your computer?
Your system is constantly running hundreds of processes, some visible and some quietly operating in the background. Keeping track of them manually is not exactly anyone's idea of a productive afternoon.
Core Monitor is a Python-based automated system process logging tool that periodically scans running processes and generates detailed, timestamped log reports containing process IDs, process names, associated usernames, and memory information.
Built using Python's psutil and schedule libraries, Core Monitor automates process information collection and maintains organized log records without requiring manual execution of every scan.
Think of it as a lightweight system activity recorder that keeps track of what's happening behind the scenes. โ๏ธ
- Fetches information about currently running system processes.
- Retrieves Process IDs (PID), process names, and associated usernames.
- Collects virtual memory usage information for individual processes.
- Uses the
psutillibrary for system and process information.
- Automatically executes process scans at user-defined intervals.
- Uses Python's
schedulelibrary for recurring task execution. - Performs an initial process scan immediately after starting.
- Continues generating logs automatically without manual intervention.
- Creates the specified log directory if it does not exist.
- Generates separate log files for every execution.
- Uses timestamps to identify individual log reports.
- Stores process information in an organized
.logformat.
Every generated log file contains:
- Process ID (PID).
- Process Name.
- Associated Username.
- Memory Usage in MB.
- Timestamp indicating when the report was generated.
- Simple command-line execution.
- Configurable logging intervals.
- Custom log storage directory.
- Built-in help and usage instructions.
- Supports
--h,-h,--u, and-uarguments.
- Handles processes that terminate during scanning.
- Handles access-denied situations.
- Skips processes that become unavailable during information collection.
Core Monitor follows a simple automated workflow.
The user provides two command-line arguments:
- Time Interval: Frequency of process logging in minutes.
- Folder Name: Directory where generated log files will be stored.
The application starts the scheduler and prints the configured logging interval and destination directory.
The application uses:
psutil.process_iter()This allows the system to iterate through currently running processes.
For every accessible process, it retrieves:
{
'pid': process_id,
'name': process_name,
'username': process_username
}It also collects memory information using:
proc.memory_info().vmsThe memory value is converted from bytes into megabytes.
The collected information is written into a timestamped .log file.
Each process is recorded with its PID, name, username, and memory information.
The Schedule library executes the logging function repeatedly at the user-defined interval.
The first execution happens immediately when the application starts. Subsequent executions follow the configured schedule.
Every execution generates a separate log file, allowing users to maintain historical snapshots of system processes.
Here is Core Monitor in action!
The following screenshot demonstrates the application starting successfully, initializing the scheduler, and generating process logs automatically.
Each execution produces a timestamped report containing information about running processes, including their PIDs, names, usernames, and memory usage.
| Technology / Library | Purpose |
|---|---|
| Python 3 | Core programming language |
| Psutil | Fetching system and process information |
| Schedule | Automating recurring process logging |
| OS | Directory management and file handling |
| Sys | Handling command-line arguments |
| Time | Generating timestamps and controlling execution intervals |
The project uses two external Python libraries:
psutilschedule
Other modules used in the application are included in Python's standard library.
CoreMonitor/
โ
โโโ CoreMonitor.py # Main process monitoring script
โ
โโโ requirements.txt # Project dependencies
โ
โโโ .gitignore # Git ignored files
โ
โโโ README.md # Project documentation
โ
โโโ LICENSE # MIT License
โ
โโโ screenshots/
โโโ execution.png # Application execution screenshot
โโโ log-file.png # Generated process log screenshot
Want to run Core Monitor on your own machine? Follow these steps.
- Python 3.x installed on your system.
- pip package manager.
- Basic knowledge of command-line operations.
git clone <YOUR_GITHUB_REPOSITORY_URL>Navigate to the project directory:
cd CoreMonitorpython -m venv venvActivate the virtual environment.
Windows:
venv\Scripts\activateLinux / macOS:
source venv/bin/activateInstall the required libraries:
pip install -r requirements.txtYour requirements.txt contains:
psutil
schedule
You're ready to go!
Core Monitor operates through a command-line interface.
To view the functionalities supported by the application:
python CoreMonitor.py --hYou can also use:
python CoreMonitor.py -hTo understand the required command-line arguments:
python CoreMonitor.py --uYou can also use:
python CoreMonitor.py -uUse the following command format:
python CoreMonitor.py <Time_Interval> <Folder_Name>Example (Windows):
python CoreMonitor.py 1 "C:\Users\YourName\Documents\CoreMonitor\logs"This command configures the application to:
- Fetch currently running system processes.
- Generate the first process log immediately.
- Store the generated log file inside the specified directory.
- Repeat the process every 1 minute.
- Continue running until manually interrupted.
To stop the application, press:
Ctrl + C
Important: The time interval must be a positive integer expressed in minutes. The script must remain running for scheduled logging to continue. If the log directory does not exist, the application creates it, provided its parent directory already exists.
Core Monitor generates a separate log file for every execution.
CoreMonitor/
โ
โโโ logs/
โ
โโโ ProcessLog_2026-11-05_21-50-04.log
โโโ ProcessLog_2026-11-05_21-51-04.log
โโโ ProcessLog_2026-11-05_21-52-04.log
โโโ ProcessLog_2026-11-05_21-53-04.log
--------------------------------------------------
---- Automated Process Logger System (Core Monitor) ----
Log generated at: 2026-11-05_21-50-04
--------------------------------------------------
PID: 0 | Name: System Idle Process | User: NT AUTHORITY\SYSTEM | RAM: 0.06 MB
PID: 4 | Name: System | User: NT AUTHORITY\SYSTEM | RAM: 0.07 MB
PID: 188 | Name: | User: None | RAM: 0.17 MB
PID: 232 | Name: Registry | User: None | RAM: 7.53 MB
PID: 428 | Name: backgroundTaskHost.exe | User: SYSTEM | RAM: 12.12 MB
--------------------------------------------------
------------------ End of log file ---------------------
The actual output depends on the processes running on the machine during each scan.
This project demonstrates the practical implementation of several Python programming concepts.
- Fetching running processes.
- Retrieving process information.
- Accessing process memory information.
- Handling unavailable processes.
- Checking whether directories exist.
- Creating directories automatically.
- Managing file paths using the OS module.
- Creating timestamped log files.
- Writing process information into files.
- Maintaining separate records for different executions.
- Scheduling recurring functions.
- Executing tasks at configurable intervals.
- Managing continuous execution using loops.
- Reading arguments using
sys.argv. - Validating the number of supplied arguments.
- Implementing help and usage flags.
- Handling processes that no longer exist.
- Managing access-denied exceptions.
- Handling zombie processes.
- Managing directory creation and log-writing errors.
Core Monitor is designed as a lightweight process logging utility. Its current implementation has the following limitations:
- It generates periodic snapshots rather than continuously monitoring process activity.
- It does not terminate, suspend, or control running processes.
- It does not provide real-time graphical monitoring.
- It does not currently track CPU utilization.
- It does not maintain a database of historical process information.
- Some process details may be unavailable due to operating system permissions.
- Separate log files are generated for every execution, with no automatic log cleanup or retention policy.
- The memory value collected by the current implementation is VMS (Virtual Memory Size), although the log labels it as RAM. It should not be interpreted as physical RAM consumption.
There is plenty of room to expand Core Monitor into a more comprehensive system monitoring solution.
Some planned improvements include:
- CPU Usage Monitoring: Track CPU consumption of individual processes.
- Memory Analytics: Add physical memory and RAM utilization statistics.
- Real-Time Dashboard: Build an interactive dashboard using Streamlit.
- Process Alerts: Generate alerts when processes exceed configurable resource thresholds.
- Historical Analytics: Store process information in a database for long-term analysis.
- Log Management: Introduce automatic log rotation and cleanup.
- Process Filtering: Allow users to monitor specific processes by name or PID.
- System Health Reports: Generate periodic summaries of system resource utilization.
- Data Visualization: Introduce graphical representations of CPU and memory usage.
Shivam Ramesh Kurlekar
GitHub: @bemo-codes
This project is licensed under the MIT License.
See the LICENSE file for more information.
Built with Python ๐ | Monitoring the processes behind the scenes โ๏ธ
โญ If you find this project interesting, consider giving the repository a star!

