Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
/ amdtop Public
forked from Syllo/nvtop

GPU & Accelerator process monitoring for AMD, with specialised path setting to ensure proper info fetching and regulate the feature shown which is more useful for AMD GPU.

License

Notifications You must be signed in to change notification settings

HUSRCF/amdtop

 
 

Repository files navigation

AMDTOP

(This project is forked from the NVTOP from Syllo which provide most of the component.) What is NVTOP?

NVTOP stands for Neat Videocard TOP, a (h)top like task monitor for GPUs and accelerators. It can handle multiple GPUs and print information about them in a htop-familiar way.

Currently supported vendors are AMD (Linux amdgpu driver), Apple (limited M1 & M2 support), Huawei (Ascend), Intel (Linux i915/Xe drivers), NVIDIA (Linux proprietary divers), Qualcomm Adreno (Linux MSM driver), Broadcom VideoCore (Linux v3d driver).

Because a picture is worth a thousand words:

NVTOP interface

🌟KEY Improvement & Why choosing AMDTOP?

Original nvtop do qutie well with nvidia card. However, some important feature like junction temperature and VRAM temperature hadn't been provided, while the RX and TX is not usable for AMD cards, which has been abondoned in newly-released AMD drive version. Moreover, the pcie monitor could had problem since amd drive's feedback information is not correct. The most accurate and reliable way is to check the systemtical information. Two pictures are shown below to compare the difference on amd gpu. ⚠️For better monitor on pcie, a sudo is needed, or else it would fall back to traitional fetching method like nvtop, which could provide misleading information.

Comparsion between NVTOP and AMDTOP

NVTOP: Whose RX/TX is not usable on AMD GPU, and incorrect pcie information.

AMDTOP: Correct Pcie info, with regulate feature to better fit the needs of AMD GPU.

Table of Contents

It has to be pointed out that the modified version had and only had tested on AMD GPU with following models: Radeon Pro W7900, Radeon RX7900XTX and Radeon RX590. Other models of cards hadn't been tested, if you had met any issues, feel free to leave at the Issues.

NVTOP Options and Interactive Commands

Interactive Setup Window

NVTOP has a builtin setup utility that provides a way to specialize the interface to your needs. Simply press F2 and select the options that are the best for you.

NVTOP Setup Window

Saving Preferences

You can save the preferences set in the setup window by pressing F12. The preferences will be loaded the next time you run amdtop.

AMDTOP Manual and Command line Options

AMDTOP comes with a manpage!

man amdtop

For quick command line arguments help

amdtop -h
amdtop --help
amdtop -v
amdtop --version

⚠️A system linkage or systemtical path should be modified or added to make sure it could be call out with such command. ⚠️Some GPU metrics (PCIe, per-process usage, temperatures) are read from ROCm SMI and kernel sysfs/debugfs, which may require elevated privileges; if you see N/A values, rerun with sudo amdtop.

AMD

NVTOP supports AMD GPUs using the amdgpu driver through the exposed DRM and sysfs interface.

AMD introduced the fdinfo interface in kernel 5.14 (browse kernel source). Hence, you will need a kernel with a version greater or equal to 5.14 to see the processes using AMD GPUs.

Support for recent GPUs are regularly mainlined into the linux kernel, so please use a recent-enough kernel for your GPU.

Build

Several libraries are required in order for NVTOP to display GPU info:

  • The ncurses library driving the user interface.
    • This makes the screen look beautiful.
  • For NVIDIA: the NVIDIA Management Library (NVML) which comes with the GPU driver.
    • This queries the GPU for info.
  • For AMD: the libdrm library used to query AMD GPUs through the kernel driver.
  • For METAX: the MetaX System Management Library (MXSML) which comes with the GPU driver.
    • This queries the GPU for info.

Distribution Specific Installation Process

By Snapcraft

sudo snap install amdtop

Other distribution is under development and coming soon...

AMDTOP Build

git clone https://github.com/HUSRCF/amdtop.git
cmake -S amdtop -B amdtop/build -DAMDGPU_SUPPORT=ON -DROCM_SMI_SUPPORT=ON -DNVIDIA_SUPPORT=OFF -DINTEL_SUPPORT=OFF
cmake --build amdtop/build -j

# Install globally on the system
sudo cmake --install amdtop/build

# Alternatively, install without privileges at a location of your choosing
# cmake --install amdtop/build --prefix /path/to/your/dir

If you use conda as environment manager and encounter an error while building NVTOP, try conda deactivate before invoking cmake.

The build system supports multiple build types (e.g. -DCMAKE_BUILD_TYPE=RelWithDebInfo):

  • Release: Binary without debug info
  • RelWithDebInfo: Binary with debug info
  • Debug: Compile with warning flags and address/undefined sanitizers enabled (for development purposes)

Troubleshoot

  • The plot looks bad:
    • Verify that you installed the wide character version of the ncurses library (libncursesw5-dev for Debian / Ubuntu), clean the build directory and restart the build process.
  • Putty: Tell putty not to lie about its capabilities ($TERM) by setting the field Terminal-type string to putty in the menu Connection > Data > Terminal Details.

License

AMDTOP is forked from NVTOP and thus inheritage the original GPLv3 license, which require a complusory open-source which you shoud pay attention to. NVTOP is licensed under the GPLv3 license or any later version. You will find a copy of the license inside the COPYING file of the repository or at the GNU website <www.gnu.org/licenses/>.

About

GPU & Accelerator process monitoring for AMD, with specialised path setting to ensure proper info fetching and regulate the feature shown which is more useful for AMD GPU.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 90.9%
  • CMake 6.3%
  • C++ 1.2%
  • Objective-C 1.1%
  • Other 0.5%