GithubHelp home page GithubHelp logo

parvvaresh / download-manager Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 891 KB

This repository contains a Python script that monitors GPU usage and logs the data into a CSV file at regular intervals. The script leverages nvidia-smi to query GPU statistics and runs in the background using the screen utility.

Shell 4.98% Python 95.02%
bash-script gpu-monitoring monitoring nvidia

download-manager's Introduction

GPU Usage Monitor

This repository contains a Python script that monitors GPU usage and logs the data into a CSV file at regular intervals. The script leverages nvidia-smi to query GPU statistics and runs in the background using the screen utility.

Project Structure

.
├── _gpu_usage
│   ├── usgae_gpu.sh
├── report_server
    ├── report_server.py
├── gpu_usage.py
└── README.md

Files and Their Functions

  • _gpu_usage/install_screen.py: Installs the screen utility.
  • _gpu_usage/run_commands.py: Executes necessary commands to set up and run the monitoring script.
  • _gpu_usage/run_in_screen.py: Runs the monitoring script in a detached screen session.
  • _gpu_usage/write_sh_file.py: Creates a shell script that logs GPU usage data.
  • gpu_usage.py: Main script that coordinates the process.

will be update

Prerequisites

  • Python 3.x
  • NVIDIA GPU with nvidia-smi installed
  • screen utility (the script will install it if not present)

Installation

  1. Clone the Repository:

    git clone https://github.com/parvvaresh/Monitor-GPU-usage
    cd Monitor-GPU-usage
  2. Run the Script:

    python3 gpu_usage.py

    The script will prompt you to enter the interval (in seconds) at which you want to log the GPU usage data.

Usage

  1. Enter the Logging Interval: When prompted, specify how frequently you want to save the GPU usage data (in seconds).

  2. Background Logging: The script will:

    • Make the logging shell script executable.
    • Install screen if it is not already installed.
    • Run the logging shell script in a detached screen session named usage_gpu.
  3. Access the Log File: The GPU usage data will be logged in a file named result.csv in the same directory as the script.

report server

  1. Clone the Repository:

    git clone https://github.com/parvvaresh/Monitor-GPU-usage
    cd Monitor-GPU-usage
  2. Use class:

    from report_server.report_server import report_server
    rs = report_server(df) # data frame who save it in your server
    rs.get_report_plot()
    rs.get_text_report()

Contributing

Contributions are welcome. Please fork the repository and submit a pull request for review.

License

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

download-manager's People

Contributors

parvvaresh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

itrcai

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.