Skip to content

A collection of Python automation scripts and utilities — starting with a Process Logger that tracks system processes and generates timestamped logs.

Notifications You must be signed in to change notification settings

NitinGhumare/Python-Automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

🖥️ Process Logger Utility

Python Platform License

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.


✨ Features

  • ✅ 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 and schedule).

📂 Project Structure

.
├── process_logger.py     # Main script
├── requirements.txt      # Dependencies
├── README.md             # Documentation
├── .gitignore            # Ignore cache, venv, IDE, logs
└── logs/                 # (Optional) Auto-created log folder

⚙️ Installation

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

🚀 Usage

Interactive Mode

python process_logger.py

👉 You will be prompted for a folder name and interval (in minutes).

Command-Line Mode

python process_logger.py logs 2

👉 Creates logs in the logs/ folder every 2 minutes.


📑 Example Output

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

--------------------------------------------------------------------------------

🤝 Contributing

  1. Fork the repo 🍴
  2. Create your feature branch (git checkout -b feature/my-feature)
  3. Commit changes (git commit -m "Add my feature")
  4. Push to branch (git push origin feature/my-feature)
  5. Open a Pull Request 🚀

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙌 Author

👤 Nitin G Ghumare
📧 nghumare570@gmail.com
🔗 LinkedIn | GitHub

About

A collection of Python automation scripts and utilities — starting with a Process Logger that tracks system processes and generates timestamped logs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages