how get cpu utilization in command line

felipe

Well-Known Member
Oct 28, 2013
222
6
58
hi,

with qm status -verbose
i dont get the cpu %
how does proxmox get it for the gui?
i would like to make some script for zabbix monitoring...
 
You need to use the API for that, for example:

# pvesh get /nodes/lola/qemu/100/status/current

or

# pvesh get /cluster/resources
 
thank you!

the output is following: (and cpu is allways 0 on a running machine- on the gui i get values)

"balloon" : 4294967296,
"cpu" : 0,
"cpus" : 2,
"disk" : 0,
"diskread" : 9269799424,
"diskwrite" : 19936676864,
"ha" : 0,
"maxdisk" : 1073741824,
"maxmem" : 4294967296,
"mem" : 3878847446,
"name" : "asb-ts",
"netin" : 4185030006,
"netout" : 288270549603,
"pid" : "1016609",
"qmpstatus" : "running",
"status" : "running",
"template" : "",
"uptime" : 1086883