Révision 5715bb24
fixed regex for "vm_name" resolv, so VMs with dash in the name will be
displayed correctly
| plugins/virtualization/kvm_mem | ||
|---|---|---|
| 82 | 82 |
result = {}
|
| 83 | 83 |
for pid in pids: |
| 84 | 84 |
cmdline = open("/proc/%s/cmdline" % pid, "r")
|
| 85 |
result[pid] = clean_vm_name(re.sub(r"^.*-name\x00([a-zA-Z0-9.-_]*)\x00\-.*$",r"\1", cmdline.readline())) |
|
| 85 |
result[pid] = clean_vm_name(re.sub(r"^.*-name\x00([a-zA-Z0-9.-_-]*)\x00\-.*$",r"\1", cmdline.readline()))
|
|
| 86 | 86 |
return result |
| 87 | 87 |
|
| 88 | 88 |
def list_pids(): |
Formats disponibles : Unified diff