Intent:
Capture the virtual machines memory, vCPU performance data along with the vGPU’s GPU utilization in the hypervisor.
Get a list of the virtual machines using:
[root@nvgrid ~]# xe vm-list | awk ‘{if ( $0 ~ /uuid/) {uuid=$5} if ($0 ~ /name-label/) {$1=$2=$3="";vmname=$0; printf "%20s - %s\n", vmname, uuid}}’
hp2-vgpu1 - 8c8781a1-c8eb-3471-2f19-37c68407015e
hp2-vgpu2 - 02ba1ffc-c8b1-8fca-a54b-edae4902a5d1
hp2-vgpu3 - 3061703c-374a-4fc5-8b65-23a84cd01106
hp2-vgpu4 - 9034ca98-fee3-643f-fc95-f189e42cb4c4
Set environment variables for each of the virtual machines to make the rrd2csv a ‘little’ more readable:
[root@nvgrid ~]# export UUID1=8c8781a1-c8eb-3471-2f19-37c68407015e
[root@nvgrid ~]# export UUID2=02ba1ffc-c8b1-8fca-a54b-edae4902a5d1
[root@nvgrid ~]# export UUID3=3061703c-374a-4fc5-8b65-23a84cd01106
[root@nvgrid ~]# export UUID4=9034ca98-fee3-643f-fc95-f189e42cb4c4
[root@nvgrid ~]# rrd2csv -n -s 5 AVERAGE:vm:$UUID1:memory AVERAGE:vm:$UUID1:cpu AVERAGE:vm:$UUID2:memory AVERAGE:vm:$UUID2:cpu AVERAGE:vm:$UUID3:memory AVERAGE:vm:$UUID3:cpu AVERAGE:vm:$UUID4:memory AVERAGE:vm:$UUID4:cpu AVERAGE:host::cpu_avg AVERAGE:host::gpu > ./vGPU-VMs-perf.csv
Now connect to your virtual machines and run some benchmarks and/or applications. This rrd2csv query utilizes wildcards by not being specific about all counter source names. If you wish to capture specific counters use the direct name following the AVERAGE:host::cpu_avg example.
<CTRL + c> to stop the capture process, then transfer the resulting .csv file to view the results.
Some counters will not have data, please look closely at the rrd2csv help via
rrd2csv -help
as well as :
Performance Monitoring Enhancements Pack for XenServer 6.1
http://support.citrix.com/article/CTX135033