{"id":13513140,"url":"https://github.com/wookayin/gpustat","last_synced_at":"2025-05-14T10:13:26.112Z","repository":{"id":7956521,"uuid":"56966563","full_name":"wookayin/gpustat","owner":"wookayin","description":"📊 A simple command-line utility for querying and monitoring GPU status","archived":false,"fork":false,"pushed_at":"2024-08-08T18:40:13.000Z","size":327,"stargazers_count":4164,"open_issues_count":31,"forks_count":286,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-04-02T00:18:47.576Z","etag":null,"topics":["command-line","gpu","gpustat","monitoring","nvidia-smi","python"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/gpustat","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wookayin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-24T10:46:43.000Z","updated_at":"2025-04-01T09:27:03.000Z","dependencies_parsed_at":"2023-09-23T18:09:28.262Z","dependency_job_id":"d2390686-4715-4e3e-a381-a0b711ba530c","html_url":"https://github.com/wookayin/gpustat","commit_stats":{"total_commits":239,"total_committers":18,"mean_commits":"13.277777777777779","dds":"0.12552301255230125","last_synced_commit":"16bb82ec22ec8d6238ebcdaade762f8514212138"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wookayin%2Fgpustat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wookayin%2Fgpustat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wookayin%2Fgpustat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wookayin%2Fgpustat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wookayin","download_url":"https://codeload.github.com/wookayin/gpustat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247954093,"owners_count":21024156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","gpu","gpustat","monitoring","nvidia-smi","python"],"created_at":"2024-08-01T04:00:39.377Z","updated_at":"2025-05-14T10:13:26.099Z","avatar_url":"https://github.com/wookayin.png","language":"Python","funding_links":[],"categories":["Uncategorized","Python","Operation System","Cross-Platform","HarmonyOS","GPU实用程序","System","\u003ca name=\"monitor-top\"\u003e\u003c/a\u003eProcess viewers and monitoring (alternatives to top)"],"sub_categories":["Uncategorized","Monitoring","JavaScript","Windows Manager"],"readme":"`gpustat`\n=========\n\n[![pypi](https://img.shields.io/pypi/v/gpustat.svg?maxAge=86400)][pypi_gpustat]\n[![license](https://img.shields.io/github/license/wookayin/gpustat.svg?maxAge=86400)](LICENSE)\n\nJust *less* than nvidia-smi?\n\n![Screenshot: gpustat -cp](https://github.com/wookayin/gpustat/raw/master/screenshot.png)\n\nNOTE: This works with NVIDIA Graphics Devices only, no AMD support as of now. Contributions are welcome!\n\nSelf-Promotion: A web interface of `gpustat` is available (in alpha)! Check out [gpustat-web][gpustat-web].\n\n[gpustat-web]: https://github.com/wookayin/gpustat-web\n\n\n\nQuick Installation\n------------------\n\nInstall from [PyPI][pypi_gpustat]:\n\n```\npip install gpustat\n```\n\nIf you don't have root (sudo) privilege, please try installing `gpustat` on user namespace: `pip install --user gpustat`.\n\nTo install the latest version (master branch) via pip:\n\n```\npip install git+https://github.com/wookayin/gpustat.git@master\n```\n\n\n### NVIDIA Driver and `pynvml` Requirements\n\n\u003e[!IMPORTANT]\n\u003e **DO NOT:** `pip install pynvml`, nor include [`pynvml`][pypi_wrong] as a dependency in your python project. This will not work.\n\u003e\n\u003e Instead: `pip install nvidia-ml-py`. [nvidia-ml-py][pypi_pynvml] is NVIDIA's the official python binding for NVML.\n\n- gpustat 1.2+: Requires `nvidia-ml-py \u003e= 12.535.108` ([#161][gh-issue-161])\n- gpustat 1.0+: Requires NVIDIA Driver **450.00** or higher and `nvidia-ml-py \u003e= 11.450.129`.\n- If your NVIDIA driver is too old, you can use older `gpustat` versions (`pip install gpustat\u003c1.0`). See [#107][gh-issue-107] for more details.\n\n\n### Python requirements\n\n- gpustat\u003c1.0: Compatible with python 2.7 and \u003e=3.4\n- gpustat 1.0: [Python \u003e= 3.4][gh-issue-66]\n- gpustat 1.1: Python \u003e= 3.6\n\n\nUsage\n-----\n\n`$ gpustat`\n\nOptions (Please see `gpustat --help` for more details):\n\n* `--color`            : Force colored output (even when stdout is not a tty)\n* `--no-color`         : Suppress colored output\n* `-u`, `--show-user`  : Display username of the process owner\n* `-c`, `--show-cmd`   : Display the process name\n* `-f`, `--show-full-cmd`   : Display full command and cpu stats of running process\n* `-p`, `--show-pid`   : Display PID of the process\n* `-F`, `--show-fan`   : Display GPU fan speed\n* `-e`, `--show-codec` : Display encoder and/or decoder utilization\n* `-P`, `--show-power` : Display GPU power usage and/or limit (`draw` or `draw,limit`)\n* `-a`, `--show-all`   : Display all gpu properties above\n* `--id`              : Target and query specific GPUs only with the specified indices (e.g. `--id 0,1,2`)\n* `--no-processes`    : Do not display process information (user, memory) ([#133][gh-issue-133])\n* `--watch`, `-i`, `--interval`   : Run in watch mode (equivalent to `watch gpustat`) if given. Denotes interval between updates.\n* `--json`             : JSON Output ([#10][gh-issue-10])\n* `--print-completion (bash|zsh|tcsh)` : Print a shell completion script. See [#131][gh-issue-131] for usage.\n\n\n### Tips\n\n- Try `gpustat --debug` if something goes wrong.\n- To periodically watch, try `gpustat --watch` or `gpustat -i` ([#41][gh-issue-41]).\n    - For older versions, one may use `watch --color -n1.0 gpustat --color`.\n- Running `nvidia-smi daemon` (root privilege required) will make querying GPUs much **faster** and use less CPU ([#54][gh-issue-54]).\n- The GPU ID (index) shown by `gpustat` (and `nvidia-smi`) is PCI BUS ID,\n  while CUDA uses a different ordering (assigns the fastest GPU with the lowest ID) by default.\n  Therefore, in order to ensure CUDA and `gpustat` use **same GPU index**,\n  configure the `CUDA_DEVICE_ORDER` environment variable to `PCI_BUS_ID`\n  (before setting `CUDA_VISIBLE_DEVICES` for your CUDA program):\n  `export CUDA_DEVICE_ORDER=PCI_BUS_ID`.\n\n\n[pypi_gpustat]: https://pypi.org/project/gpustat/\n[pypi_pynvml]: https://pypi.org/project/nvidia-ml-py/#history\n[pypi_wrong]: https://pypi.org/project/pynvml/\n[gh-issue-10]: https://github.com/wookayin/gpustat/issues/10\n[gh-issue-41]: https://github.com/wookayin/gpustat/issues/41\n[gh-issue-54]: https://github.com/wookayin/gpustat/issues/54\n[gh-issue-66]: https://github.com/wookayin/gpustat/issues/66\n[gh-issue-107]: https://github.com/wookayin/gpustat/issues/107\n[gh-issue-131]: https://github.com/wookayin/gpustat/issues/131\n[gh-issue-133]: https://github.com/wookayin/gpustat/issues/133\n[gh-issue-161]: https://github.com/wookayin/gpustat/issues/161#issuecomment-1784007533\n\nDefault display\n---------------\n\n```\n[0] GeForce GTX Titan X | 77°C,  96 % | 11848 / 12287 MB | python/52046(11821M)\n```\n\n- `[0]`: GPU index (starts from 0) as PCI_BUS_ID\n- `GeForce GTX Titan X`: GPU name\n- `77°C`: GPU Temperature (in Celsius)\n- `96 %`: GPU Utilization\n- `11848 / 12287 MB`: GPU Memory Usage (Used / Total)\n- `python/...`: Running processes on GPU, owner/cmdline/PID (and their GPU memory usage)\n\nChangelog\n---------\n\nSee [CHANGELOG.md](CHANGELOG.md)\n\n\nLicense\n-------\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwookayin%2Fgpustat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwookayin%2Fgpustat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwookayin%2Fgpustat/lists"}