IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Resurrect the logic after it has been occasionally broken during fixing
the syntax complains from python.
Fixes: c588ba9 ("examples/nodestat: Fix None comparison")
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
"is" compares for "points to the same object", which for strings is the
same as comparing the byte sequence itself as Python hashes each strings
to only stores a unique copy of each string.
> examples/nodestats.py:86:43: F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
> examples/nodestats.py:91:12: F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
> examples/nodestats.py:94:40: F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
Use "==" and "!=" for string comparsion.
Signed-off-by: Philipp Hahn <hahn@univention.de>
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>
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>