A simple Python utility to monitor system processes and generate timestamped logs at regular intervals.
Useful for developers, sysadmins, and anyone who wants to keep track of running processes automatically.
- ✅ Records PID, Process Name, Username, Memory Usage (MB).
- ✅ Creates timestamped log files in a specified folder.
- ✅ Supports both interactive mode and command-line arguments.
- ✅ Works on Linux, macOS, and Windows.
- ✅ Lightweight, dependency-free (only
psutil
andschedule
).
.
├── process_logger.py # Main script
├── requirements.txt # Dependencies
├── README.md # Documentation
├── .gitignore # Ignore cache, venv, IDE, logs
└── logs/ # (Optional) Auto-created log folder
Clone the repository:
git clone https://github.com/NitinGhumare/process-logger.git
cd process-logger
Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Linux/macOS
venv\Scripts\activate # On Windows
Install dependencies:
pip install -r requirements.txt
python process_logger.py
👉 You will be prompted for a folder name and interval (in minutes).
python process_logger.py logs 2
👉 Creates logs in the logs/
folder every 2 minutes.
A sample log file (process_log_20250930_120000.log
):
--------------------------------------------------------------------------------
System Process Log
Log created at : Tue Sep 30 12:00:00 2025
--------------------------------------------------------------------------------
PID: 1234 Name: python.exe User: nitin Memory: 150.23 MB
PID: 5678 Name: chrome.exe User: nitin Memory: 300.78 MB
PID: 9012 Name: explorer.exe User: nitin Memory: 120.12 MB
--------------------------------------------------------------------------------
- Fork the repo 🍴
- Create your feature branch (
git checkout -b feature/my-feature
) - Commit changes (
git commit -m "Add my feature"
) - Push to branch (
git push origin feature/my-feature
) - Open a Pull Request 🚀
This project is licensed under the MIT License - see the LICENSE file for details.
👤 Nitin G Ghumare
📧 nghumare570@gmail.com
🔗 LinkedIn | GitHub