1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-15 20:59:34 +03:00
Commit Graph

2 Commits

Author SHA1 Message Date
b22e4f2441 Drop support for python 2
python2 will be end of life by the time of the next
libvirt release. All our supported build targets, including
CentOS7, have a python3 build available.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-04 12:14:51 +00:00
fa21f3d927 examples: Introduce nodestats example
So, this is an exercise to show libvirt capabilities. Firstly, for
each host NUMA nodes some statistics are printed out, i.e. total
memory and free memory. Then, for each running domain, that has memory
strictly bound to certain host nodes, a small statistics of how much
memory it takes is printed out too. For instance:

        # ./examples/nodestats.py
        NUMA stats
        NUMA nodes:     0       1       2       3
        MemTotal:       3950    3967    3937    3943
        MemFree:        66      56      42      41
        Domain 'fedora':
                Overall memory: 1536 MiB
        Domain 'fedora22':
                Overall memory: 2048 MiB
        Domain 'fedora21':
                Overall memory: 1024 MiB nodes 0-1
                Node 0: 1024 MiB nodes 0-1
        Domain 'gentoo':
                Overall memory: 4096 MiB nodes 0-3
                Node 0: 1024 MiB nodes 0
                Node 1: 1024 MiB nodes 1
                Node 2: 1024 MiB nodes 2
                Node 3: 1024 MiB nodes 3

We can see 4 host NUMA nodes, all of them having roughly 4GB of RAM.
Yeah, all of them has nearly all the memory consumed. Then, there are
four domains running. For instance, domain 'fedora' has 1.5GB memory
which is not pinned onto any specific host NUMA node. Domain 'gentoo' on
the other hand has 4GB memory and has 4 NUMA nodes which are pinned 1:1
to host nodes.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-07-17 11:42:44 +02:00