[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCHv3 00/10] Add BlkIO and CPU/mem stat API implementations for lxc

This patch set adds block io, memory and domain cpu statistics API
slot implementations to the LXC driver, in order to get linux
container monitoring and accounting a bit closer to qemu standards.

The last patch is a tad quirky (happy to hear suggestions on
alternative ways), in that it widens the permissible value set
at the .domainBlockStats slot: for lxc guests, it is relatively
likely to have zero disk devices, since host filesystems can be
used via passthrough bind mounts. Therefore, passing the zero-length
string as device path, is interpreted as 'return summary stats for
the entire domains's block io'.

v3 addresses review comments, and adds unit tests for good measure.

Thorsten Behrens (10):
  Add util virCgroupGetBlkioIo*Serviced methods.
  Implement domainMemoryStats API slot for LXC driver.
  Make qemuGetDomainTotalCPUStats a virCgroup function.
  Implement domainGetCPUStats for lxc driver.
  Implement lxcDomainBlockStats* for lxc driver
  Widening API change - accept empty path for virDomainBlockStats
  Add unit test for virCgroupGetBlkioIo*Serviced
  Add unit test for virCgroupGetMemoryUsage.
  Fix misspelled cpuacct.usage_percpu in cgroup mock.
  Add unit test for virCgroupGetPercpuStats.

 src/libvirt.c                |   8 +-
 src/libvirt_private.syms     |   4 +
 src/lxc/lxc_driver.c         | 297 +++++++++++++++++++++++++++++++++
 src/qemu/qemu_driver.c       |  54 +-----
 src/util/vircgroup.c         | 382 +++++++++++++++++++++++++++++++++++++++++++
 src/util/vircgroup.h         |  24 +++
 tests/vircgroupmock.c        | 109 +++++++++++-
 tests/vircgrouptest.c        | 234 ++++++++++++++++++++++++++
 tools/virsh-domain-monitor.c |  11 +-
 tools/virsh.pod              |   5 +-
 10 files changed, 1066 insertions(+), 62 deletions(-)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]