1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-12 09:17:41 +03:00

B #4072: Fix monitoring probes (#4073)

(cherry picked from commit 42df8eb2e3)
This commit is contained in:
Christian González 2020-01-07 13:43:28 +01:00 committed by Ruben S. Montero
parent d93d84842d
commit 4c50a44ba6
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87
2 changed files with 2 additions and 2 deletions

View File

@ -166,7 +166,7 @@ module KVM
end end
def self.number_of_processors def self.number_of_processors
%x{nproc}.to_i `grep -c processor /proc/cpuinfo`.to_i
end end
def self.get_cpu_jiffies def self.get_cpu_jiffies

View File

@ -162,7 +162,7 @@ module LXD
# @param vm_names [Array] of vms indexed by name. Value is a hash with :pid # @param vm_names [Array] of vms indexed by name. Value is a hash with :pid
# @return [Hash] with ps information # @return [Hash] with ps information
def get_cpu(vm_names) def get_cpu(vm_names)
multiplier = `nproc`.to_i * 100 multiplier = `grep -c processor /proc/cpuinfo`.to_i * 100
start_cpu_jiffies = get_cpu_jiffies start_cpu_jiffies = get_cpu_jiffies