commit 1773a676c93b9c0e05485d584974abe34e1b25f3 Author: W. David Ashley w.david.ashley@gmail.com Date: Fri Jul 10 09:29:38 2015 -0500
Domains chapter - corrected example 35 (did not work before)
en-US/extras/Domains-Example-35.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) --- diff --git a/en-US/extras/Domains-Example-35.py b/en-US/extras/Domains-Example-35.py index 5ad3e80..f5d3252 100644 --- a/en-US/extras/Domains-Example-35.py +++ b/en-US/extras/Domains-Example-35.py @@ -10,12 +10,15 @@ if conn == None: print('Failed to open connection to qemu:///system', file=sys.stderr) exit(1)
-dom = conn.lookupByID(6) +dom = conn.lookupByID(5) if dom == None: print('Failed to find the domain '+domName, file=sys.stderr) exit(1)
-print('"memory used: '+dom.memoryStats().value() +stats = dom.memoryStats() +print('memory used: '+str(stats['actual'])+' (actual)') +print(' '+str(stats['swap_in'])+' (swap_in)') +print(' '+str(stats['rss'])+' (rss)')
conn.close() exit(0)
docs-commits@lists.fedoraproject.org