Giter VIP home page Giter VIP logo

gpukill's Introduction

GPUKILL

zimmer08@PTB23:~$ sudo gpukill -h

GPU Kill v0.1, [email protected], BSD 2-Clause

Usage: sudo gpukill [-l| -p PID| -h]
  Shows a menu of processes running on the gpu your user got assigned
  Assignment is done by being a member of one of the gpu0, gpu1, etc groups
Options:
  l        list all processes on the assigned gpu without showing a menu
  k PID    kills the process with id PID if its running on your gpu

known Issues:
   - User can only be assigned to one group
   - Signal to be send is not configureable
   - Process that got send a kill signal will still be shown on the list

List Processes

zimmer08@PTB23:~$ sudo gpukill -l

Running Processes:
12247 zimmer08  551 MiB python -c import torch;a=torch.zeros(10).cuda();import time;time.sleep(100)```


## Kill one of these Processes
`zimmer08@PTB23:~$ sudo gpukill -k 12247`
```Accessing GPU 1
Killed 12247 zimmer08  551 MiB python -c import torch;a=torch.zeros(10).cuda();import time;time.sleep(100)

Alternative: Find Process ID using nvidia-smi and kill it using gpukill

zimmer08@PTB23:~$ nvidia-smi

+-------------------------------------------------------+
| Processes:                                            |
|  GPU   GI   CI        PID   Type   Process name       |
|        ID   ID                                        |        
|=======================================================|
|    1   N/A  N/A     12410      C   python             | 
+-------------------------------------------------------+

zimmer08@PTB23:~$ sudo gpukill -k 12410

Killed 12410 zimmer08  551 MiB python -c import torch;a=torch.zeros(10).cuda();import time;time.sleep(100)

###INSTALLATION

sudo sh -c "cp gpukill /usr/sbin;chown root:root /usr/sbin/gpukill; chmod +x /usr/sbin '
sudo sh -c "cp gpukillrule /etc/sudoers.d/gpukill; chown root:root /etc/sudoers.d/gpukill; chmod 0440 /etc/sudoers.d/gpukill"

gpukill's People

Contributors

fzimmermann89 avatar

Watchers

 avatar  avatar

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.