Skip to content

A simple yet effective script for monitoring system resources like CPU, RAM, and GPU usage.

Notifications You must be signed in to change notification settings

ParrotXray/Performance-Monitor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Performance Monitor

python-version ubuntu-version

Overview

The Performance Monitor is a Python script designed to monitor and log the performance metrics of a specific process on your system. It tracks CPU, RAM, GPU usage, and VRAM utilization over time. This tool is particularly useful for analyzing the resource consumption of applications, especially in development and testing environments.

Features

  • Monitors CPU and RAM usage.
  • Monitors GPU and VRAM usage (requires NVIDIA GPU).
  • Logs performance data to an Excel file for easy visualization and analysis.
  • Adjustable data recording intervals based on the monitoring duration.
  • Calculates and displays average resource usage statistics.

Dependencies

To run the Performance Monitor, you need to have the following Python libraries installed:

  • time
  • psutil for CPU and RAM monitoring.
  • openpyxl for logging data to an Excel file.
  • pynvml for NVIDIA GPU monitoring.

Install these dependencies using pip:

pip3 install -r requirements.txt

Installation

Clone the repository or download the PerformanceMonitor.py script to your local machine.

Usage

  1. Open a terminal or command prompt.
  2. Navigate to the directory containing PerformanceMonitor.py.
  3. Run the script with the command you want to monitor as an argument:
python3 PerformanceMonitor.py <command or PID number>

Replace <command or PID number> with the command you wish to monitor (e.g., python your_script.py or 55899).

Output

The script will create an Excel file named Performance.xlsx in the same directory, containing the performance metrics logged during the monitoring period.

About

A simple yet effective script for monitoring system resources like CPU, RAM, and GPU usage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%