Linux View video card information:
Lspci | Grep-i VGA
Using the NVIDIA GPU you can:
Lspci | Grep-i nvidia
The front serial number "00:0f.0" is the graphics card code (here is the use of the virtual machine);
To view the details of a specified video card, use the following directive:
Lspci-v-S 00:0f.0
Linux View Nvidia graphics information and usage
Nvidia has a command-line tool to view video memory usage:
Nvidia-smi
Table Header Interpretation:
Fan: Display fan speed, the value between 0到100%, is the computer's desired speed, if the computer is not through the fan cooling or fan is not broken, it shows that it is n/A; temp: the internal temperature of the video card, the unit is Celsius; Perf: Characterize performance status, from P0 to P12, P0 represents maximum performance, P12 indicates state minimum performance; PWR: energy consumption representation; Bus-id: Related information about GPU bus; DISP.A: is display active meaning, indicating whether GPU shows initialization; Memory Usage: Usage of video memory; Vo Latile Gpu-util: Floating GPU utilization; Compute M: Calculation mode;
The processes below shows the video memory used by each process on each GPU.
If you want to periodically output the use of the video card, you can use the watch instruction to achieve:
Watch-n Nvidia-smi
command-line argument-n followed by the period in which the command was executed, in S.