Closed sedge closed 11 years ago
The current state of the API returns the following response:
{
"version": {
"stderr": "",
"stdout": "Compiled against library: libvir 0.9.13\nUsing library: libvir 0.9.13\nUsing API: QEMU 0.9.13\nRunning hypervisor: QEMU 1.0.0",
"hypervisor": "QEMU 0.9.13",
"api": "libvir 0.9.13",
"library": "libvir 0.9.13"
},
"cpuStats": {
"stderr": "",
"stdout": "usage: 0.7%\nuser: 0.5%\nsystem: 0.2%\nidle: 99.3%\niowait: 0.0%",
"iowait": "0.0",
"idle": "99.3",
"system": "0.2",
"user": "0.5",
"usage": "0.7"
},
"memStats": {
"stderr": "",
"stdout": "total : 16294560 KiB\nfree : 12072392 KiB\nbuffers: 185188 KiB\ncached : 1948508 KiB",
"cached": "1948508",
"buffers": "185188",
"free": "12072392",
"total": "16294560"
}
}
Memory stats are displayed in GB values.
Create an API call that, provided with a daemon-server IP, runs three Virsh commands
virsh version
virsh nodecpustats --percent
virsh nodememstats
and parses them, returning the following format: