Skip to content

Developed an automation script in Python to log information about all running processes at periodic intervals, with an additional feature of automatically sending the log report through email.

License

Notifications You must be signed in to change notification settings

ShiwaniKadu/periodic-process-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Periodic Process Logger with Auto-Scheduled Log Report Facility

This Python script periodically logs information about all running processes on the system and sends the log file through email. The script uses psutil for process information, schedule for scheduling tasks, and smtplib for sending emails.

Features

  • Periodic Logging: Logs running processes at user-defined intervals.
  • Log File Creation: Creates a log file in the Marvellous directory.
  • Email Notification: Sends the log file via email.
  • Internet Connectivity Check: Checks for internet connectivity before sending the email.

Technologies Used

  • Python
  • psutil for process information
  • schedule for task scheduling
  • smtplib for email functionality

Prerequisites

  • Python 3.x
  • Required Python packages:
    • psutil
    • schedule

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/your-repository.git
    cd your-repository
  2. Create and activate a virtual environment:

    python -m venv env
    source env/bin/activate  # On Windows use `env\Scripts\activate`
  3. Install the required dependencies:

    pip install psutil schedule

Usage

To run the script, provide the time interval in minutes as a command-line argument:

python your_script.py <interval>

About

Developed an automation script in Python to log information about all running processes at periodic intervals, with an additional feature of automatically sending the log report through email.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages