diff --git a/src/cli/one_helper/oneacct_helper.rb b/src/cli/one_helper/oneacct_helper.rb index bdae3293e3..71ffefa223 100644 --- a/src/cli/one_helper/oneacct_helper.rb +++ b/src/cli/one_helper/oneacct_helper.rb @@ -155,26 +155,22 @@ class AcctHelper < OpenNebulaHelper::OneHelper d["VM"]["TEMPLATE"]["CPU"] end - column :NET_RX, "Data received from the network", :size=>6 do |d| + column :NETRX, "Data received from the network", :size=>6 do |d| # NET is measured in bytes, unit_to_str expects KBytes OpenNebulaHelper.unit_to_str(d["VM"]["MONITORING/NETRX"].to_i / 1024.0, {}) end - column :NET_TX, "Data sent to the network", :size=>6 do |d| + column :NETTX, "Data sent to the network", :size=>6 do |d| # NET is measured in bytes, unit_to_str expects KBytes OpenNebulaHelper.unit_to_str(d["VM"]["MONITORING/NETTX"].to_i / 1024.0, {}) end - column :DISK_ACTUAL, "Total disk size used", :size=>6 do |d| + column :TOTAL_DISK_SIZE, "Total disk size used", :size=>6 do |d| # DISK size is measured in mb, unit_to_str expects KBytes - OpenNebulaHelper.unit_to_str(d["VM"]["MONITORING/DISK_ACTUAL_SIZE"].to_i * 1024.0, {}) + OpenNebulaHelper.unit_to_str(d["VM"]["MONITORING/TOTAL_DISK_SIZE"].to_i * 1024.0, {}) end - column :DISK_VIRTUAL, "Total disk virtual size used", :size=>6 do |d| - # DISK size is measured in mb, unit_to_str expects KBytes - OpenNebulaHelper.unit_to_str(d["VM"]["MONITORING/DISK_VIRTUAL_SIZE"].to_i * 1024.0, {}) - end - default :VID, :HOSTNAME, :ACTION, :REASON, :START_TIME, :END_TIME, :MEMORY, :CPU, :NET_RX, :NET_TX, :DISK_ACTUAL, :DISK_VIRTUAL + default :VID, :HOSTNAME, :ACTION, :REASON, :START_TIME, :END_TIME, :MEMORY, :CPU, :NETRX, :NETTX, :TOTAL_DISK_SIZE end SHOWBACK_TABLE = CLIHelper::ShowTable.new("oneshowback.yaml", nil) do diff --git a/src/cli/one_helper/onevm_helper.rb b/src/cli/one_helper/onevm_helper.rb index fb2aa12050..3c285b31ce 100644 --- a/src/cli/one_helper/onevm_helper.rb +++ b/src/cli/one_helper/onevm_helper.rb @@ -503,18 +503,17 @@ class OneVMHelper < OpenNebulaHelper::OneHelper CLIHelper.print_header(str_h1 % "VIRTUAL MACHINE MONITORING",false) poll_attrs = { - "USED MEMORY" => "MONITORING/USEDMEMORY", - "USED CPU" => "MONITORING/USEDCPU", - "NET_TX" => "MONITORING/NETTX", - "NET_RX" => "MONITORING/NETRX", - "DISK SIZE (ACTUAL)" => "MONITORING/DISK_ACTUAL_SIZE", - "DISK SIZE (VIRTUAL)" => "MONITORING/DISK_VIRTUAL_SIZE" + "MEMORY" => "MONITORING/MEMORY", + "CPU" => "MONITORING/CPU", + "NETTX" => "MONITORING/NETTX", + "NETRX" => "MONITORING/NETRX", + "TOTAL DISK SIZE" => "MONITORING/TOTAL_DISK_SIZE" } poll_attrs.each { |k,v| - if k == "USED CPU" + if k == "CPU" puts str % [k,vm[v]] - elsif k == "USED MEMORY" + elsif k == "MEMORY" puts str % [k, OpenNebulaHelper.unit_to_str(vm[v].to_i, {})] elsif k =~ /DISK/ puts str % [k, OpenNebulaHelper.unit_to_str(vm[v].to_i*1024, {})]