Usually we check the GPU information, such as which process is occupying the GPU, how much it is occupying, how the GPU utilization is, and other information, all use nvidia-smi, but this information is real-time, which means you can’t Check the changes in a certain period of time.
nvtop (NVIDIA TOP) is an htop-like task monitor for NVIDIA GPUs, similar in function to nvidia-smi, but with more beautiful features than nvidia-smi The appearance also makes up for the defect that nvidia-smi cannot check the GPU changes in a certain period of time.
First look at an official renderings:
The screenshot when I use it myself:
If you are still satisfied, let's see how to install it.
The next installation steps are for Ubuntu 18.04, 16.04 is estimated to be fine.
But if you are 19.04, it is very simple, just one command:
sudo apt install nvtop
I won't repeat this step, I think everyone should have already installed it. If not, please refer to How to install the NVIDIA drivers on Ubuntu 18.04 Bionic Beaver Linux.
sudo apt install cmake libncurses5-dev libncursesw5-dev git
Before starting, if you are using conda and you are already in a conda virtual environment, please conda deactivate
to exit the environment.
git clone https://github.com/Syllo/nvtop.git
mkdir -p nvtop/build && cd nvtop/build
cmake ..
# If an error is reported:"Could NOT find NVML (missing: NVML_INCLUDE_DIRS)"
# Then please use the following command
# cmake ..-DNVML_RETRIEVE_HEADER_ONLINE=True
make
make install #Need root privileges, if you report a privilege error, please add sudo
At this point it is installed.
Generally speaking, you only need to enter nvtop
and press Enter, but there are some parameters that you can change.
$ nvtop --help
nvtop version 1.0.0
Available options:-d --delay : Select the refresh rate(1==0.1s)-v --version : Print the version and exit
- s --gpu-select : Colon separated list of GPU IDs to monitor
- i --gpu-ignore : Colon separated list of GPU IDs to ignore
- p --no-plot : Disable bar plot
- r --reverse-abs : Reverse abscissa: plot the recent data left and older on the right
- C --no-color : No colors
- N --no-cache : Always query the system for user names and command line information
- f --freedom-unit : Use fahrenheit
- E --encode-hide : Set encode/decode auto hide time inseconds(default 30s, negative = always on screen)-h --help : Print help and exit
Recommended Posts