From 5ccd20200a30bb38ef5b5a219db990c4df06e334 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Fri, 30 Jul 2010 12:45:46 +0200 Subject: [PATCH] onevm show now displays monitoring information --- src/cli/onevm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/cli/onevm b/src/cli/onevm index bce3ccb5fa..9af326913b 100755 --- a/src/cli/onevm +++ b/src/cli/onevm @@ -343,7 +343,7 @@ Commands: * resume (Resumes the execution of a saved VM) onevm resume -* saveas (Set the specified vm's disk to be saved in a new image (image_name) +* saveas (Set the specified vms disk to be saved in a new image (image_name) when the vm shutdowns) onevm saveas @@ -785,6 +785,19 @@ true) print_header(str_h1,"VIRTUAL MACHINE TEMPLATE",false) puts vm.template_str + puts + print_header(str_h1,"VIRTUAL MACHINE MONITORING",false) + + poll_attrs = { + "USED MEMORY" => "MEMORY", + "USED CPU" => "CPU", + "NET_TX" => "NET_TX", + "NET_RX" => "NET_RX" + } + + poll_attrs.each do |k,v| + puts str % [k,vm[v]] + end else puts vm.to_xml(true) end