admin-api: add admin.vm.Stats method

QubesOS/qubes-issues#853
This commit is contained in:
Marek Marczykowski-Górecki 2017-07-27 20:07:11 +02:00
parent 58426f1476
commit f8474af28d
No known key found for this signature in database
GPG Key ID: F32894BE9684938A

View File

@ -133,6 +133,7 @@ to set the policy using current mechanism.
| `admin.backup.Info` | `dom0` | config id | - | backup info | info what would be included in the backup | `admin.backup.Info` | `dom0` | config id | - | backup info | info what would be included in the backup
| `admin.backup.Cancel` | `dom0` | config id | - | - | cancel running backup operation | `admin.backup.Cancel` | `dom0` | config id | - | - | cancel running backup operation
| `admin.Events` | `dom0|vm` | - | - | events | | `admin.Events` | `dom0|vm` | - | - | events |
| `admin.vm.Stats` | `dom0|vm` | - | - | `vm-stats` events, see below | emit VM statistics (CPU, memory usage) in form of events
Volume properties: Volume properties:
@ -145,6 +146,12 @@ Volume properties:
- `save_on_stop` - `save_on_stop`
- `snap_on_start` - `snap_on_start`
Method `admin.vm.Stats` returns `vm-stats` events every `stats_interval` seconds, for every running VM. Parameters of `vm-stats` events:
- `memory_kb` - memory usage in kB
- `cpu_time` - absolute CPU time (in milliseconds) spent by the VM since its startup, normalized for one CPU
- `cpu_usage` - CPU usage in percents
## Returned messages ## Returned messages