forgot if-statement in last commit
This commit is contained in:
parent
3c7915808b
commit
3599249e2d
@ -150,37 +150,41 @@ def main():
|
|||||||
cpu_usages = None
|
cpu_usages = None
|
||||||
|
|
||||||
if arguments.raw_data:
|
if arguments.raw_data:
|
||||||
if ''
|
fields_to_display = arguments.raw_data
|
||||||
fields_to_display = ["name", "on", "state", "updbl", "type", "template", "netvm", "label" ]
|
if 'cpu' in arguments.raw_data:
|
||||||
|
qhost = QubesHost()
|
||||||
|
(measure_time, cpu_usages) = qhost.measure_cpu_usage(qvm_collection)
|
||||||
|
else:
|
||||||
|
fields_to_display = ["name", "on", "state", "updbl", "type", "template", "netvm", "label" ]
|
||||||
|
|
||||||
if (arguments.ids):
|
if (arguments.ids):
|
||||||
fields_to_display += ["qid", "xid"]
|
fields_to_display += ["qid", "xid"]
|
||||||
|
|
||||||
if (arguments.cpu):
|
if (arguments.cpu):
|
||||||
qhost = QubesHost()
|
qhost = QubesHost()
|
||||||
(measure_time, cpu_usages) = qhost.measure_cpu_usage(qvm_collection)
|
(measure_time, cpu_usages) = qhost.measure_cpu_usage(qvm_collection)
|
||||||
fields_to_display += ["cpu"]
|
fields_to_display += ["cpu"]
|
||||||
|
|
||||||
if (arguments.mem):
|
if (arguments.mem):
|
||||||
fields_to_display += ["mem"]
|
fields_to_display += ["mem"]
|
||||||
|
|
||||||
if arguments.backup:
|
if arguments.backup:
|
||||||
fields_to_display += ["last backup"]
|
fields_to_display += ["last backup"]
|
||||||
|
|
||||||
if (arguments.network):
|
if (arguments.network):
|
||||||
if 'template' in fields_to_display:
|
if 'template' in fields_to_display:
|
||||||
fields_to_display.remove ("template")
|
fields_to_display.remove ("template")
|
||||||
fields_to_display += ["ip", "ip back", "gateway/DNS"]
|
fields_to_display += ["ip", "ip back", "gateway/DNS"]
|
||||||
|
|
||||||
if (arguments.disk):
|
if (arguments.disk):
|
||||||
if 'template' in fields_to_display:
|
if 'template' in fields_to_display:
|
||||||
fields_to_display.remove ("template")
|
fields_to_display.remove ("template")
|
||||||
if 'netvm' in fields_to_display:
|
if 'netvm' in fields_to_display:
|
||||||
fields_to_display.remove ("netvm")
|
fields_to_display.remove ("netvm")
|
||||||
fields_to_display += ["priv-curr", "priv-max", "root-curr", "root-max", "disk" ]
|
fields_to_display += ["priv-curr", "priv-max", "root-curr", "root-max", "disk" ]
|
||||||
|
|
||||||
if (arguments.kernel):
|
if (arguments.kernel):
|
||||||
fields_to_display += ["kernel", "kernelopts" ]
|
fields_to_display += ["kernel", "kernelopts" ]
|
||||||
|
|
||||||
|
|
||||||
vms_list = [vm for vm in qvm_collection.values()]
|
vms_list = [vm for vm in qvm_collection.values()]
|
||||||
|
Loading…
Reference in New Issue
Block a user