gpustat

📊 查詢與監控 GPU 狀態的簡易命令列工具

gpustat 是什麼?

📊 gpustat 是一款簡易的命令列工具,用於查詢與監控 GPU 狀態。它能快速顯示 GPU 使用率、記憶體用量、溫度與運作中程序等資訊,支援多 GPU 環境與即時更新,適合開發者與系統管理員使用。

gpustat 概覽

這是什麼

gpustat 是一個命令列工具,用於查詢和監控 GPU 狀態。它支援透過 NVML 監控 NVIDIA GPU、透過 ROCm SMI 監控 AMD GPU,以及透過 npu-smi 監控華為昇騰 910B NPU。

主要功能

  • 顯示 GPU 索引、名稱、溫度、使用率、記憶體用量及執行中的程序。
  • 支援彩色輸出、JSON 輸出以及定期更新的監控模式。
  • 可顯示額外資訊,如使用者名稱、命令、PID、風扇轉速、編解碼器使用率和電源用量。
  • 允許依索引指定特定 GPU,並選擇後端(自動、nvidia、amd 或 ascend)。
  • 提供 Python API,可程式化查詢 GPU 狀態。

使用情境

  • 在開發或生產環境中監控 GPU 健康狀態與使用率。
  • 除錯 GPU 記憶體用量與程序分配。
  • 將 GPU 狀態整合至腳本或監控儀表板。

快速開始

從 PyPI 安裝:pip install gpustat從 GitHub 安裝最新版本:pip install git+https://github.com/wookayin/gpustat.git@master安裝後,執行 gpustat 即可顯示 GPU 狀態。

授權與價格

本專案採用 MIT 授權條款。它是開源且免費使用的。

內容整理自該專案公開的 README 與儲存庫資訊。

將此徽章加入你的 README

Featured on YunoDB 徽章樣式與說明

你是這個專案的維護者嗎?展示它已收錄於 YunoDB。

Markdown[![Featured on YunoDB](https://yunodb.com/badge/wookayingpustat.svg)](https://yunodb.com/tools/wookayingpustat?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/wookayingpustat?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/wookayingpustat.svg" alt="Featured on YunoDB" height="20"></a>