Citrix Xenserver Performance Monitoring ✧ <ULTIMATE>
: No custom alerts, limited data export, no multi-host correlation. 3.2 xe CLI Commands for Monitoring Retrieve live performance counters:
# Top 5 VMs by CPU usage (from Dom0) xentop -b -d 1 -n 5 xe host-list params=name-label,memory-total,memory-free | grep -B2 -A3 "free: [0-9]*$" Find VMs with disk latency >10 ms for vm in $(xe vm-list is-control-domain=false --minimal | tr ',' '\n'); do latency=$(xe vm-data-source-query vm=$vm data-source="vbd_xvda_latency" | awk 'print $2') if (( $(echo "$latency > 10" | bc -l) )); then echo $vm $latency; fi done This write-up applies to XenServer 7.x / 8.x and Citrix Hypervisor 8.2+. Always test monitoring scripts in a lab before production. citrix xenserver performance monitoring
xentop -d 2 -b For iSCSI, NFS, or Fibre Channel SRs: : No custom alerts, limited data export, no
# Host CPU utilization (average over 5 sec) xe host-data-source-list host=<host_uuid> name_label="cpu_usage" xe host-data-source-query host=<host_uuid> data-source="cpu_usage" xe vm-data-source-list vm=<vm_name> name_label="cpu_usage" xe vm-data-source-query vm=<vm_name> data-source="cpu_usage" VM disk latency xe vm-data-source-query vm=<vm_name> data-source="vbd_xvda_latency" Memory ballooning xe vm-data-source-query vm=<vm_name> data-source="memory_actual" 3.3 RRD Updates XenServer stores performance data in Round-Robin Databases (RRD) under /var/lib/xcp/rrd/ . You can extract them using: xentop -d 2 -b For iSCSI, NFS, or
import XenAPI session = XenAPI.Session("https://xenserver") session.login_with_password("user", "pass")