June 2017
Intermediate to advanced
340 pages
8h 22m
English
To collect CPU, memory, and state information about a running instance, use the following Python methods:
In [1]: instance.name()Out[1]: 'kvm_python'In [2]:
In [2]: instance.isActive()Out[2]: 1In [3]:
In [3]: instance.info()Out[3]: [1, 1048576L, 1048576L, 1, 10910000000L]In [4]:
In [4]: instance.maxMemory()Out[4]: 1048576LIn [5]:
In [5]: instance.getCPUStats(1)Out[5]:[{'cpu_time': 10911545901L, 'system_time': 1760000000L, 'user_time': 1560000000L}]In [6]:
Read now
Unlock full access