{"id":13607336,"url":"https://github.com/Umio-Yasuno/amdgpu_top","last_synced_at":"2025-04-12T11:32:14.012Z","repository":{"id":107157643,"uuid":"608814472","full_name":"Umio-Yasuno/amdgpu_top","owner":"Umio-Yasuno","description":"Tool to display AMDGPU usage","archived":false,"fork":false,"pushed_at":"2025-04-03T09:48:50.000Z","size":5594,"stargazers_count":972,"open_issues_count":0,"forks_count":27,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-07T08:03:28.635Z","etag":null,"topics":["amdgpu","libdrm"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Umio-Yasuno.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-02T19:45:14.000Z","updated_at":"2025-04-06T05:52:55.000Z","dependencies_parsed_at":"2023-04-08T10:02:15.810Z","dependency_job_id":"c16b9f11-d403-4705-8f18-b73888071c4b","html_url":"https://github.com/Umio-Yasuno/amdgpu_top","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Umio-Yasuno%2Famdgpu_top","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Umio-Yasuno%2Famdgpu_top/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Umio-Yasuno%2Famdgpu_top/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Umio-Yasuno%2Famdgpu_top/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Umio-Yasuno","download_url":"https://codeload.github.com/Umio-Yasuno/amdgpu_top/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248560204,"owners_count":21124613,"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":["amdgpu","libdrm"],"created_at":"2024-08-01T19:01:17.776Z","updated_at":"2025-04-12T11:32:14.006Z","avatar_url":"https://github.com/Umio-Yasuno.png","language":"Rust","funding_links":[],"categories":["Rust","\u003ca name=\"monitor-top\"\u003e\u003c/a\u003eProcess viewers and monitoring (alternatives to top)"],"sub_categories":[],"readme":"# AMDGPU\\_TOP\n`amdgpu_top` is tool that display AMD GPU utilization, like [umr](https://gitlab.freedesktop.org/tomstdenis/umr/) or [clbr/radeontop](https://github.com/clbr/radeontop) or [intel_gpu_top](https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/man/intel_gpu_top.rst).  \nThe tool displays information gathered from performance counters (GRBM, GRBM2), sensors, fdinfo, and AMDGPU driver.  \n\n| Simple TUI\u003cbr\u003e(like nvidia-smi, rocm-smi) | TUI | GUI |\n| :-: | :-: | :-: |\n| ![amdgpu_top Simple TUI](https://github.com/Umio-Yasuno/amdgpu_top/assets/53935716/66c3fb7e-cb23-4a19-ab10-2bb9919a1a8a) | ![amdgpu_top TUI](https://github.com/Umio-Yasuno/amdgpu_top/assets/53935716/859010d8-07b3-411c-b079-c4a837855d41) | ![amdgpu_top GUI mode](https://github.com/Umio-Yasuno/amdgpu_top/assets/53935716/e3ff372e-86f9-4b82-b3c9-910b638a3c90) |\n\n## Quick links\n * [Usage](#usage)\n   * [Options](#options)\n   * [Commands for TUI](#commands-for-tui)\n   * [Example of using JSON mode](#example-of-using-json-mode)\n   * [fdinfo description](#fdinfo-description)\n * [Installation](#installation)\n   * [Packages](#packages)\n   * [Build from source](#build-from-source)\n     * [Distribution specific instructions](#distribution-specific-instructions)\n * [Binary Size](#binary-size)\n * [References](#references)\n * [Translations](#translations)\n * [Alternatives](#alternatives)\n\n## Dependent dynamic libraries\n * libdrm\n * libdrm_amdgpu\n\n## Usage\n```\ncargo run -- [options ..]\n# or\namdgpu_top [options ..]\n```\n\n```\n# Run TUI mode\namdgpu_top\n\n# Run GUI mode\namdgpu_top --gui\n\n# Run SMI mode\namdgpu_top --smi\n\n# Dump AMDGPU info\namdgpu_top -d\n\n# Dump AMDGPU info and gpu_metrics\namdgpu_top -d -gm\n\n# Dump AMDGPU info and pp_table\namdgpu_top -d --pp-table\n\n# Dump AMDGPU info in JSON format\namdgpu_top -d --json\n\n# Dump DRM info\namdgpu_top --drm-info\n\n# Decode gpu_metrics file\namdgpu_top --decode-gm \u003cpath\u003e\n\n# Decode gpu_metrics file and output in JSON format\namdgpu_top --json --decode-gm \u003cpath\u003e\n```\n\n### Options\n```\nFLAGS:\n   -d, --dump\n       Dump AMDGPU info. (Specifications, VRAM, PCI, ResizableBAR, VBIOS, Video caps)\n       This option can be combined with the \"-J\" option.\n   --list\n       Display a list of AMDGPU devices.\n   -J, --json\n       Output JSON formatted data.\n       This option can be combined with the \"-d\" option.\n   --gui\n       Launch GUI mode.\n   --smi\n       Launch Simple TUI mode. (like nvidia-smi, rocm-smi)\n   -p, --process\n       Dump All GPU processes and memory usage per process.\n   --apu, --select-apu\n       Select APU instance.\n   --single, --single-gpu\n       Display only the selected APU/GPU\n   --no-pc\n       The application does not read the performance counter (GRBM, GRBM2)\n       if this flag is set.\n       Reading the performance counter may deactivate the power saving feature of APU/GPU.\n   -gm, --gpu_metrics, --gpu-metrics\n       Dump gpu_metrics for all AMD GPUs.\n       https://www.kernel.org/doc/html/latest/gpu/amdgpu/thermal.html#gpu-metrics\n   --pp_table, --pp-table\n       Dump pp_table from sysfs and VBIOS for all AMD GPUs.\n       (only support Navi1x and Navi2x, Navi3x)\n   --drm_info, --drm-info\n       Dump DRM info.\n       Inspired by https://gitlab.freedesktop.org/emersion/drm_info\n    --xdna\n       Dump XDNA NPU info.\n   --dark, --dark-mode\n       Set to the dark mode. (TUI/GUI)\n   --light, --light-mode\n       Set to the light mode. (TUI/GUI)\n   --gl, --opengl\n       Use OpenGL API to the GUI backend.\n   --vk, --vulkan\n       Use Vulkan API to the GUI backend,\n       and use APU/iGPU for GUI rendering if it is available.\n   -V, --version\n       Print version information.\n   -h, --help\n       Print help information.\n\nOPTIONS:\n   -i \u003cusize\u003e\n       Select GPU instance.\n   --pci \u003cString\u003e\n       Specifying PCI path. (domain:bus:dev.func)\n   -s \u003cu64\u003e, -s \u003cu64\u003ems\n       Refresh period (interval) in milliseconds for JSON mode. (default: 1000ms)\n   -n \u003cu32\u003e\n       Specifies the maximum number of iteration for JSON mode.\n       If 0 is specified, it will be an infinite loop. (default: 0)\n   -u \u003cu64\u003e, --update-process-index \u003cu64\u003e\n       Update interval in seconds of the process index for fdinfo. (default: 5s)\n   --json_fifo, --json-fifo \u003cString\u003e\n       Output JSON formatted data to FIFO (named pipe) for other application and scripts.\n   --decode-gm \u003cPath\u003e, --decode-gpu-metrics \u003cPath\u003e\n       Decode the specified gpu_metrics file.\n```\n\n### Commands for TUI\n| key |                                     |\n| :-- | :---------------------------------: |\n| g   | toggle GRBM                         |\n| r   | toggle GRBM2                        |\n| v   | toggle VRAM/GTT Usage               |\n| f   | toggle fdinfo                       |\n| n   | toggle Sensors                      |\n| m   | toggle GPU Metrics                  |\n| h   | change update interval (high = 100ms, low = 1000ms) |\n| q   | Quit                                |\n| P   | sort fdinfo by pid                  |\n| M   | sort fdinfo by VRAM usage           |\n| G   | sort fdinfo by GFX usage            |\n| M   | sort fdinfo by MediaEngine usage    |\n| R   | reverse sort                        |\n\n### Example of using JSON mode\n```\n$ amdgpu_top --json | jq -c -r '(.devices[] |\n  (.Info | .DeviceName + \" (\" + .PCI + \"): \") +\n  ([.gpu_activity | to_entries[] | .key + \": \" + (.value.value|tostring) + .value.unit] |\n  join(\", \")))'\n```\n\n#### Output\n```\nAMD Radeon RX 6600 (0000:03:00.0): GFX: 13%, MediaEngine: 0%, Memory: 4%\nAMD Radeon Graphics (0000:08:00.0): GFX: 0%, MediaEngine: 0%, Memory: null%\nAMD Radeon RX 6600 (0000:03:00.0): GFX: 15%, MediaEngine: 0%, Memory: 5%\nAMD Radeon Graphics (0000:08:00.0): GFX: 0%, MediaEngine: 0%, Memory: null%\nAMD Radeon RX 6600 (0000:03:00.0): GFX: 3%, MediaEngine: 0%, Memory: 2%\nAMD Radeon Graphics (0000:08:00.0): GFX: 0%, MediaEngine: 0%, Memory: null%\n...\n```\n\n### fdinfo description\nfdinfo for the AMDGPU driver shows hardware IP usage per process.  \n\n### VRAM\nGPU Memory.  \n\n### GTT\nGraphics Translation Tables.  \n\n### KFD\nThe process of using the AMDKFD driver.  \n\n#### GFX\nGFX engine.  \n\n#### Compute/COMP\nCompute engine.  \nThe AMDKFD driver dose not track queues and does not show them in fdinfo.  \n\n#### DMA\nDMA/SDMA (System DMA) engine.  \n\n#### Decode/DEC\nMedia decoder.  \nThis is not show on VCN4 or later.  \n\n#### Encode/ENC\nMedia encoder.  \nThis is not show on VCN4 or later.  \n\n#### VCN, Media\nMedia engine.  \nFrom VCN4, the encoding queue and decoding queue have been unified.  \nThe AMDGPU driver handles both decoding and encoding as contexts for the encoding engine.  \n\nThis is the average of the video decoder/encoder and the JPEG decoder usage.  \n\n#### JPEG\nJPEG decoder.  \n\n#### VPE\nVideo Processor Engine.  \nref: \u003chttps://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/amd/vpelib/README.md?ref_type=heads\u003e  \n\n#### VCN_Unified\nThe video decoder/encoder usage for VCN4.  \n\n## Installation\n### Packages\n * [Releases](https://github.com/Umio-Yasuno/amdgpu_top/releases/latest)\n   * .deb (generated by [cargo-deb](https://github.com/kornelski/cargo-deb))\n   * .rpm (generated by [cargo-generate-rpm](https://github.com/cat-in-136/cargo-generate-rpm))\n   * .AppImage (generated by [xbuild](https://github.com/rust-mobile/xbuild))\n * [Arch Linux](https://archlinux.org/packages/extra/x86_64/amdgpu_top/)\n   * To install run: `sudo pacman -S amdgpu_top`\n   * Alternatively, install from the [AUR](https://aur.archlinux.org/packages/amdgpu_top-git)\n * [OpenMandriva](https://github.com/OpenMandrivaAssociation/amdgpu_top)\n   * To install run: `sudo dnf install amdgpu_top`\n * [Nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/am/amdgpu_top/package.nix)\n * [Solus](https://github.com/getsolus/packages/tree/main/packages/a/amdgpu_top)\n   * To install run: `sudo eopkg it amdgpu_top`\n\n### Build from source\n```\ncargo install amdgpu_top\n\n# or\n\ngit clone https://github.com/Umio-Yasuno/amdgpu_top\ncd amdgpu_top\ncargo install --locked --path .\n```\n\n#### without GUI\n```\ncargo install --locked --path . --no-default-features --features=\"tui\"\n```\n\n#### Distribution specific instructions\n##### Debian/Ubuntu\n```\nsudo apt install libdrm-dev\n```\n\n##### Fedora\n```\nsudo dnf install libdrm-devel\n```\n\n## Binary Size\n\n| Features       | Size (stripped) |\n| :------------- | :-------------: |\n| json           | ~1.1M |\n| tui            | ~1.5M |\n| json, tui      | ~1.7M |\n| json, tui, gui | ~18M  |\n\n## References\n * [Tom St Denis / umr · GitLab](https://gitlab.freedesktop.org/tomstdenis/umr/)\n * Mesa3D\n    * [src/gallium/drivers/radeonsi/si_gpu_load.c · main · Mesa / mesa · GitLab](https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/gallium/drivers/radeonsi/si_gpu_load.c)\n * AMD Documentation\n    * [R6xx_R7xx_3D.pdf](https://developer.amd.com/wordpress/media/2013/10/R6xx_R7xx_3D.pdf)\n    * [CIK_3D_registers_v2.pdf](http://developer.amd.com/wordpress/media/2013/10/CIK_3D_registers_v2.pdf)\n    * [MI200 performance counters and metrics — ROCm Documentation](https://rocm.docs.amd.com/en/docs-6.0.0/conceptual/gpu-arch/mi200-performance-counters.html)\n * \u003chttps://github.com/AMDResearch/omniperf/tree/v1.0.4/src/perfmon_pub\u003e\n * \u003chttps://github.com/freedesktop/mesa-r600_demo\u003e\n * [radeonhd:r6xxErrata](https://www.x.org/wiki/radeonhd:r6xxErrata/)\n * Linux Kernel AMDGPU Driver\n    * libdrm_amdgpu API\n        * `/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c`\n    * `amdgpu_allowed_register_entry`\n        * `/drivers/gpu/drm/amd/amdgpu/{cik,nv,vi,si,soc15,soc21}.c`\n\n## Translations\n`amdgpu_top` is using [cargo-i18n](https://github.com/kellpossible/cargo-i18n/) with [Project Fluent](https://projectfluent.org/) for translation.  \nPlease refer to [pop-os/popsicle](https://github.com/pop-os/popsicle#translators) for additional supported languages.  \n\n### Supported Languages\n * [en](./crates/amdgpu_top_gui/i18n/en/amdgpu_top_gui.ftl)\n * [ja (partial)](./crates/amdgpu_top_gui/i18n/ja/amdgpu_top_gui.ftl)\n * [ka](./crates/amdgpu_top_gui/i18n/ka/amdgpu_top_gui.ftl)\n\n## Alternatives\nIf `amdgpu_top` is not enough for you or you don't like it, try the following applications.\n\n * `AMD_DEBUG=info \u003copengl application\u003e` or `RADV_DEBUG=info \u003cvulkan application\u003e`\n    * Print AMDGPU-related information\n    * \u003chttps://docs.mesa3d.org/envvars.html#envvar-AMD_DEBUG\u003e\n    * \u003chttps://docs.mesa3d.org/envvars.html#envvar-RADV_DEBUG\u003e\n * [clbr/radeontop](https://github.com/clbr/radeontop)\n    * View your GPU utilization, both for the total activity percent and individual blocks.\n * [Syllo/nvtop](https://github.com/Syllo/nvtop)\n    * GPUs process monitoring for AMD, Intel and NVIDIA\n * [Tom St Denis / umr · GitLab](https://gitlab.freedesktop.org/tomstdenis/umr/)\n    * User Mode Register Debugger for AMDGPU Hardware\n * [GPUOpen-Tools/radeon_gpu_profiler](https://github.com/GPUOpen-Tools/radeon_gpu_profiler)\n    * for developer\n    * Radeon GPU Profiler (RGP) is a tool from AMD that allows for deep inspection of GPU workloads. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUmio-Yasuno%2Famdgpu_top","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUmio-Yasuno%2Famdgpu_top","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUmio-Yasuno%2Famdgpu_top/lists"}