Révision 3267bbd0
kvm_net: switch to python3
| plugins/libvirt/kvm_net | ||
|---|---|---|
| 1 |
#!/usr/bin/python |
|
| 2 |
# -*- coding: utf-8 -*- |
|
| 1 |
#!/usr/bin/python3 |
|
| 3 | 2 |
# vim: set fileencoding=utf-8 |
| 4 | 3 |
# |
| 5 | 4 |
# Munin plugin to show the network I/O per vm |
| ... | ... | |
| 112 | 111 |
@return a list of pids from running kvm |
| 113 | 112 |
""" |
| 114 | 113 |
pid = Popen("pidof qemu-kvm qemu-system-x86_64 kvm", shell=True, stdout=PIPE)
|
| 115 |
return pid.communicate()[0].split() |
|
| 114 |
return pid.communicate()[0].decode().split()
|
|
| 116 | 115 |
|
| 117 | 116 |
|
| 118 | 117 |
if __name__ == "__main__": |
Formats disponibles : Unified diff