Part5: GPU-VDI deep dive – ESXi-GPU using CLI

ESXi commands for NVIDIA GPU
ESXi Commands
Description
gpuvm
Show what VMs are using gpu(s)
Esxcli software vib install –v /path-tovib/ name-of-vib.vib
Loads the NVIDIA VIB
esxcli software vib list | grep NVIDIA
Verify NVIDIA vib is installed
Esxcli system module load –module nvidia
Verify NVIDIA module loads
Esxcli hardware pci list –c 0x300 –m 0xff
Verify devices are present
nvidia-smi
General status of the GPU / driver version
GPUVM
This command will show the list of View desktops (online/powered on), assigned/allocated certain amount (KB) of GPU memory equally across all the View desktops in the pool.
Example:
~ # gpuvm
Xserver unix:0, GPU maximum memory 2076672KB
        pid 24686, VM “viewfltg1”, reserved 131072KB of GPU memory.
        pid 24720, VM “viewfltg4”, reserved 131072KB of GPU memory.
        pid 24691, VM “viewfltg2”, reserved 131072KB of GPU memory.
        pid 24692, VM “viewfltg3”, reserved 131072KB of GPU memory.
        pid 25919, VM “viewfltg7”, reserved 131072KB of GPU memory.
        pid 25920, VM “viewfltg8”, reserved 131072KB of GPU memory.
        pid 25674, VM “viewfltg5”, reserved 131072KB of GPU memory.
        pid 25675, VM “viewfltg6”, reserved 131072KB of GPU memory.
        pid 52907, VM “viewfltg9”, reserved 131072KB of GPU memory.
        pid 53146, VM “viewfltg10”, reserved 131072KB of GPU memory.
        GPU memory left 765952KB.
~ #
NVIDIA-SMI
This command will tell you allocated VRAM, GPU temperature etc. More importantly it will show the %utilization of the GPU. The VM is idle. Hence Volatile GPU-Util shows 0%.
Example:
~ # nvidia-smi
Thu May  9 12:32:19 2013
+——————————————————+
| NVIDIA-SMI 4.304.76   Driver Version: 304.76         |
|——————————-+———————-+———————-+
| GPU  Name                     | Bus-Id        Disp.  | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap| Memory-Usage         | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro 4000              | 0000:06:00.0     Off |                  N/A |
| 36%   40C   P12    N/A /  N/A |  12%  245MB / 2047MB |      0%      Default |
+——————————-+———————-+———————-+
+—————————————————————————–+
| Compute processes:                                               GPU Memory |
|  GPU       PID  Process name                                     Usage      |
|=============================================================================|
|  No running compute processes found                                         |
+—————————————————————————–+
WATCH NVIDIA-SMI
This command will continually poll the GPU and display % utilization every 2 or 3 seconds (Real-time).
The VM is playing a YouTube video, the Volatile GPU-Util shows 32%. The values vary real-time.
Every 2s: nvidia-smi                                                                                      2013-05-09 12:41:15
Thu May  9 12:41:15 2013
+——————————————————+
| NVIDIA-SMI 4.304.76   Driver Version: 304.76         |
|——————————-+———————-+———————-+
| GPU  Name                     | Bus-Id        Disp.  | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap| Memory-Usage         | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro 4000              | 0000:06:00.0     Off |                  N/A |
| 36%   40C   P12    N/A /  N/A |  12%  245MB / 2047MB |     32%      Default |
+——————————-+———————-+———————-+
+—————————————————————————–+
| Compute processes:                                               GPU Memory |
|  GPU       PID  Process name                                     Usage      |
|=============================================================================|
|  No running compute processes found                                         |
+—————————————————————————–+
/ETC/INIT.D/XORG<space>STATUS
This command tells the status of the xorg service if running or not. This service must be running to get the GPU operational in the hypervisor.
~ # /etc/init.d/xorg status
Xorg is not running
~ # /etc/init.d/xorg status
Xorg is running
~ #
/ETC/INIT.D/XORG<space>START
~ # /etc/init.d/xorg start
Xorg0 started
/ETC/INIT.D/XORG<space>RESTART
~ # /etc/init.d/xorg restart
watchdog-Xorg0: Terminating watchdog process with PID 98577
Process 98600 stopped
Xorg0 started
ESXCLI SOFTWARE VIB LIST | GREP NVIDIA
This command shows the NVIDIA driver related information and also tells that the driver is installed in the hypervisor.
Example:
~ # esxcli software vib list | grep NVIDIA
NVIDIA-VMware_ESXi_5.1_Host_Driver  304.76-1OEM.510.0.0.802205          NVIDIA  VMwareAccepted    2013-05-07
~ #
ESXCLI SYSTEM MODULE LIST | GREP NVIDIA
This command confirms that the NVIDIA driver is successfully installed on the hypervisor.
~ # esxcli system module list | grep nvidia
nvidia                              true        true
ESXCLI HARDWARE PCI LIST –C 0x300 –M 0xFF
This command is used to verify if the NVIDIA driver has been installed and loaded successfully.
Example:
~ # esxcli hardware pci list -c 0x300 -m 0xff
000:006:00.0
   Address: 000:006:00.0
   Segment: 0x0000
   Bus: 0x06
   Slot: 0x00
   Function: 0x00
   VMkernel Name:
   Vendor Name: NVIDIA Corporation
   Device Name: NVIDIAQuadro 4000
   Configured Owner: Unknown
   Current Owner: VMkernel
   Vendor ID: 0x10de
   Device ID: 0x06dd
   SubVendor ID: 0x10de
   SubDevice ID: 0x0780
   Device Class: 0x0300
   Device Class Name: VGA compatible controller
   Programming Interface: 0x00
   Revision ID: 0xa3
   Interrupt Line: 0x0b
   IRQ: 11
   Interrupt Vector: 0xc0
   PCI Pin: 0x0f
   Spawned Bus: 0x00
   Flags: 0x0201
   Module ID: 73
   Module Name: nvidia
   Chassis: 0
   Physical Slot: 4
   Slot Description: CPU1 Slot1
   Passthru Capable: true
   Parent Device: PCI 0:0:2:0
   Dependent Device: PCI 0:0:2:0
   Reset Method: Bridge reset
   FPT Sharable: true
000:009:01.0
   Address: 000:009:01.0
   Segment: 0x0000
   Bus: 0x09
   Slot: 0x01
   Function: 0x00
   VMkernel Name:
   Vendor Name: Matrox Graphics, Inc.
   Device Name: MGA G200eW WPCM450
   Configured Owner: Unknown
   Current Owner: VMkernel
   Vendor ID: 0x102b
   Device ID: 0x0532
   SubVendor ID: 0x15d9
   SubDevice ID: 0x0630
   Device Class: 0x0300
   Device Class Name: VGA compatible controller
   Programming Interface: 0x00
   Revision ID: 0x0a
   Interrupt Line: 0x0a
   IRQ: 10
   Interrupt Vector: 0x39
   PCI Pin: 0x2f
   Spawned Bus: 0x00
   Flags: 0x0221
   Module ID: -1
   Module Name: None
   Chassis: 0
   Physical Slot: 34
   Slot Description:
   Passthru Capable: true
   Parent Device: PCI 0:0:30:0
   Dependent Device: PCI 0:0:30:0
   Reset Method: Bridge reset
   FPT Sharable: true
~ #
Advertisements

About cloudray

Predominantly based around Virtualization, but will include other technology related information and anything else I find interesting and feel the need to share with you. I also use this Blog as both a place to store useful information that I think that will come in handy to me at some point in the future, and also a place to help aid my learning. I find a great way to learn about something is to research about it and then write it up in my own words. I'm Pushpal Ray, from India. As a certified VCP3/4/5 professional, I am currently working as an Independent Consultant. Over 10 years of IT-industry experience, currently focused around the Desktop Virtualization(End-User Computing). I also have extensive experience in Windows Administration, Datacenter Migration, Workload profiling & benchmarking. At my leisure, I enjoy hiking, running, photography, spend hours in my fav coffee shop & spend quality time with my wife. Occasionally, catch up with few friends for a drink!
This entry was posted in Enterprise Virtualization and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s