Skip to content

Commit e321cc4

Browse files
committed
Make kvm plugins also work on RedHat based systems
On RedHat the binary that is used is called qemu-kvm not kvm.
1 parent 5bbe97e commit e321cc4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

plugins/virtualization/kvm_cpu

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def list_pids():
7575
''' Find the pid of kvm processes
7676
@return a list of pids from running kvm
7777
'''
78-
pid = Popen("pidof kvm", shell=True, stdout=PIPE)
78+
pid = Popen("pidof qemu-kvm kvm", shell=True, stdout=PIPE)
7979
return pid.communicate()[0].split()
8080

8181
def fetch(vms):

plugins/virtualization/kvm_io

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def list_pids():
9292
''' Find the pid of kvm processes
9393
@return a list of pids from running kvm
9494
'''
95-
pid = Popen("pidof kvm", shell=True, stdout=PIPE)
95+
pid = Popen("pidof qemu-kvm kvm", shell=True, stdout=PIPE)
9696
return pid.communicate()[0].split()
9797

9898
if __name__ == "__main__":

plugins/virtualization/kvm_mem

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def list_pids():
8989
''' Find the pid of kvm processes
9090
@return a list of pids from running kvm
9191
'''
92-
pid = Popen("pidof kvm", shell=True, stdout=PIPE)
92+
pid = Popen("pidof qemu-kvm kvm", shell=True, stdout=PIPE)
9393
return pid.communicate()[0].split()
9494

9595
if __name__ == "__main__":

0 commit comments

Comments
 (0)