From 4c50a44ba64c2271c11990b2011697349d2659d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gonz=C3=A1lez?= Date: Tue, 7 Jan 2020 13:43:28 +0100 Subject: [PATCH] B #4072: Fix monitoring probes (#4073) (cherry picked from commit 42df8eb2e3b1d01c8362d8d9bf3250fb4aa35d32) --- src/vmm_mad/remotes/kvm/poll | 2 +- src/vmm_mad/remotes/lxd/poll | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vmm_mad/remotes/kvm/poll b/src/vmm_mad/remotes/kvm/poll index 811618dd14..dbc0232d88 100755 --- a/src/vmm_mad/remotes/kvm/poll +++ b/src/vmm_mad/remotes/kvm/poll @@ -166,7 +166,7 @@ module KVM end def self.number_of_processors - %x{nproc}.to_i + `grep -c processor /proc/cpuinfo`.to_i end def self.get_cpu_jiffies diff --git a/src/vmm_mad/remotes/lxd/poll b/src/vmm_mad/remotes/lxd/poll index 28191b405f..f89b482966 100755 --- a/src/vmm_mad/remotes/lxd/poll +++ b/src/vmm_mad/remotes/lxd/poll @@ -162,7 +162,7 @@ module LXD # @param vm_names [Array] of vms indexed by name. Value is a hash with :pid # @return [Hash] with ps information 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