Hi Michal,
thx for further cleaning up, and pushing -
Michal Privoznik wrote:
+if (!virCgroupGetMemoryUsage(priv-cgroup, mem_usage))
+goto cleanup;
+
+ret = 0;
+if (!virDomainObjIsActive(vm))
+goto cleanup;
I think these two lines (well three), otherwise we
I wrote:
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.
Hi guys,
hmm, this would be cool to get into 1.2.2 - any chance for that? ;)
Some
This reads blkio stats from blkio.throttle.io_service_bytes and
blkio.throttle.io_serviced.
---
src/libvirt_private.syms | 2 +
src/util/vircgroup.c | 254 +++
src/util/vircgroup.h | 12 +++
3 files changed, 268 insertions(+)
diff --git
And provide domain summary stat in that case, for lxc backend.
Use case is a container inheriting all devices from the host,
e.g. when doing application containerization.
---
src/libvirt.c| 8 ++--
tools/virsh-domain-monitor.c | 11 ---
tools/virsh.pod |
---
tests/vircgrouptest.c | 66 +++
1 file changed, 66 insertions(+)
diff --git a/tests/vircgrouptest.c b/tests/vircgrouptest.c
index e05b882..5c14efb 100644
--- a/tests/vircgrouptest.c
+++ b/tests/vircgrouptest.c
@@ -33,6 +33,7 @@
# include
domains's block io'.
v4 addresses the last remaining review comments.
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
---
Notes to v4:
- check errors before filling param array
- UL-ULL change punted to separate patch
src/lxc/lxc_driver.c | 56
1 file changed, 56 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index f735631..827d989
Adds lxcDomainBlockStatsFlags and lxcDomainBlockStats functions.
---
src/lxc/lxc_driver.c | 195 +++
1 file changed, 195 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index e31b3ac..e1fcceb 100644
--- a/src/lxc/lxc_driver.c
To reuse this from other drivers, like lxc.
---
src/libvirt_private.syms | 1 +
src/qemu/qemu_driver.c | 54 ++--
src/util/vircgroup.c | 53 +++
src/util/vircgroup.h | 5 +
4 files changed, 61
---
Notes to v4:
- share fake disk device path via header file instead of env var
tests/testutilslxc.h | 3 ++
tests/vircgroupmock.c | 98 +-
tests/vircgrouptest.c | 129 ++
3 files changed, 228
---
tests/vircgrouptest.c | 35 +++
1 file changed, 35 insertions(+)
diff --git a/tests/vircgrouptest.c b/tests/vircgrouptest.c
index df29531..e05b882 100644
--- a/tests/vircgrouptest.c
+++ b/tests/vircgrouptest.c
@@ -530,6 +530,38 @@ static int
---
Notes to v4:
- removed extraneous variable
src/libvirt_private.syms | 1 +
src/lxc/lxc_driver.c | 49 +++
src/util/vircgroup.c | 75
src/util/vircgroup.h | 7 +
4 files changed, 132 insertions(+)
---
tests/vircgroupmock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/vircgroupmock.c b/tests/vircgroupmock.c
index d154a4a..ae88984 100644
--- a/tests/vircgroupmock.c
+++ b/tests/vircgroupmock.c
@@ -215,7 +215,7 @@ static int make_controller(const char *path, mode_t
---
tests/vircgrouptest.c | 66 +++
1 file changed, 66 insertions(+)
diff --git a/tests/vircgrouptest.c b/tests/vircgrouptest.c
index 6826442..dfcb0aa 100644
--- a/tests/vircgrouptest.c
+++ b/tests/vircgrouptest.c
@@ -32,6 +32,7 @@
# include
And provide domain summary stat in that case, for lxc backend.
Use case is a container inheriting all devices from the host,
e.g. when doing application containerization.
---
src/libvirt.c| 8 ++--
tools/virsh-domain-monitor.c | 11 ---
tools/virsh.pod |
---
Turned out during test writing, when this was actually used the
first time.
tests/vircgroupmock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/vircgroupmock.c b/tests/vircgroupmock.c
index d772652..84bb1b0 100644
--- a/tests/vircgroupmock.c
+++
Adds lxcDomainBlockStatsFlags and lxcDomainBlockStats functions.
---
Notes v3:
- merged patch, both api methods now added in one
- addressed comments from v2 review
- check for cgroup controllers actually being mounted
src/lxc/lxc_driver.c | 196
---
tests/vircgrouptest.c | 35 +++
1 file changed, 35 insertions(+)
diff --git a/tests/vircgrouptest.c b/tests/vircgrouptest.c
index a29cdd2..6826442 100644
--- a/tests/vircgrouptest.c
+++ b/tests/vircgrouptest.c
@@ -532,6 +532,38 @@ static int
---
Adds another dummy device to push the cgroup parsing code a bit
harder
tests/vircgroupmock.c | 107 +++-
tests/vircgrouptest.c | 133 ++
2 files changed, 238 insertions(+), 2 deletions(-)
diff --git
This reads blkio stats from blkio.throttle.io_service_bytes and
blkio.throttle.io_serviced.
---
Notes v3:
- beyond the minor nits from the last review,
virCgroupGetBlkioIoDeviceServiced was rather busted wrt. string
ptr p. Now fixed, and with unit test (separate patch)
To reuse this from other drivers, like lxc.
---
src/libvirt_private.syms | 1 +
src/qemu/qemu_driver.c | 54 ++--
src/util/vircgroup.c | 53 +++
src/util/vircgroup.h | 5 +
4 files changed, 61
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
---
Notes v3:
- moved most of the code out to virCgroupGetPercpuStats, for better
testability.
- addressed comments from v2 review
src/libvirt_private.syms | 1 +
src/lxc/lxc_driver.c | 51
src/util/vircgroup.c | 75
---
src/lxc/lxc_driver.c | 50 ++
1 file changed, 50 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 138c706..02b5cc3 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -5169,6 +5169,55 @@
Hi,
sorry for the noise - but I don't see the patch series pushed yet?
Gao feng wrote:
[...]
ACK with these changed.
Should I fix the editorial issues resubmit?
Cheers,
-- Thorsten
signature.asc
Description: Digital signature
--
libvir-list mailing list
libvir-list@redhat.com
---
src/lxc/lxc_driver.c | 124 +++
1 file changed, 124 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 7fa9612..57d8fcb 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -77,6 +77,8 @@
#define
domains's block io'.
Thorsten Behrens (6):
Add util virCgroupGetBlkioIo*Serviced methods.
Implement domainMemoryStats API slot for LXC driver.
Make qemuGetDomainTotalCPUStats a virCgroup function.
Implement domainGetCPUStats for lxc driver.
Implemet lxcDomainBlockStats for lxc driver
Gao feng wrote:
+virCgroupGetBlkioIoServiced(virCgroupPtr group,
+long long *bytes_read,
+long long *bytes_write,
+long long *requests_read,
+long long *requests_write)
+{
---
Notes on v2:
- works as-is, will send lxcDomainBlockStatsFlags patch separately
src/lxc/lxc_driver.c | 51 +++
1 file changed, 51 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 19426f5..bf6fd5c 100644
---
---
Notes on v2:
- check if domain is running, fixed ret val calculation
- api slot comment is now referencing 1.2.2
src/lxc/lxc_driver.c | 50 ++
1 file changed, 50 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index
To reuse this from other drivers, like lxc.
---
Notes on v2:
- renamed to proper camel case: virCgroupGetDomainTotalCpuStats
src/libvirt_private.syms | 1 +
src/qemu/qemu_driver.c | 54 ++--
src/util/vircgroup.c | 53
This reads blkio stats from blkio.throttle.io_service_bytes and
blkio.throttle.io_serviced.
---
Notes v2:
- loop over all devices in io_service_bytes / io_serviced files
- report value_names in error message
- adds overflow checks to summation
- moved loop invariants out for
---
Notes on v2:
- elided extra memset and leftover loop var n
- api slot comment references 1.2.2 now
src/lxc/lxc_driver.c | 128 +++
1 file changed, 128 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index
And provide domain summary stat in that case, for lxc backend.
Use case is a container inheriting all devices from the host,
e.g. when doing application containerization.
---
Notes on v2:
- adapted virDomainBlockStats docs
- adapted virsh domblkstat docs
- made virsh actually accept empty disk
---
build-aux/bracket-spacing.pl | 8
1 file changed, 8 insertions(+)
diff --git a/build-aux/bracket-spacing.pl b/build-aux/bracket-spacing.pl
index 802a640..fd7438e 100755
--- a/build-aux/bracket-spacing.pl
+++ b/build-aux/bracket-spacing.pl
@@ -144,6 +144,14 @@ foreach my $file
---
examples/object-events/event-test.c | 20 +--
src/conf/nwfilter_conf.c| 72 ++---
src/esx/esx_vi.c| 2 +-
src/libvirt.c | 2 +-
src/nwfilter/nwfilter_learnipaddr.c | 2 +-
src/openvz/openvz_conf.c
Check for whitespace around assignments / compount assignment
operators. Fix syntax-check fallout in PATCH 2/2.
Thorsten Behrens (2):
Make syntax check notice assignments w/o surrounding spaces.
maint: align whitespace with project conventions.
build-aux/bracket-spacing.pl| 8
This reads blkio stats from blkio.throttle.io_service_bytes and
blkio.throttle.io_serviced.
---
Note on v3:
- rebased to current master, sadly the
virCgroupSetBlkioDeviceReadBps etc conflicted
src/libvirt_private.syms | 2 +
src/util/vircgroup.c | 242
for the entire domains's block io'.
Thorsten Behrens (6):
Add util virCgroupGetBlkioIo*Serviced methods.
Implement domainMemoryStats API slot for LXC driver.
Make qemuGetDomainTotalCPUStats a virCgroup function.
Implement domainGetCPUStats for lxc driver.
Implemet lxcDomainBlockStats
---
src/lxc/lxc_driver.c | 52
1 file changed, 52 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 7e56a59..9f586af 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -4554,6 +4554,57 @@
This reads blkio stats from blkio.throttle.io_service_bytes and
blkio.throttle.io_serviced.
---
src/libvirt_private.syms | 2 +
src/util/vircgroup.c | 208 +++
src/util/vircgroup.h | 12 +++
3 files changed, 222 insertions(+)
diff --git
To reuse this from other drivers, like lxc.
---
src/libvirt_private.syms | 1 +
src/qemu/qemu_driver.c | 54 ++--
src/util/vircgroup.c | 53 +++
src/util/vircgroup.h | 5 +
4 files changed, 61
And provide domain summary stats in that case, for lxc backend.
Use case is a container domain using passthrough bind mounts of the
host filesystem, which is a common case for lxc.
---
src/libvirt.c | 1 -
src/lxc/lxc_driver.c | 10 ++
src/qemu/qemu_driver.c | 2
---
src/lxc/lxc_driver.c | 132 +++
1 file changed, 132 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 9f586af..1e9c77a 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -75,6 +75,8 @@
#define
---
src/lxc/lxc_driver.c | 51 +++
1 file changed, 51 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 1e9c77a..1d2a457 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -2021,6 +2021,56 @@
45 matches
Mail list logo