Révision 28c44877
Fixing Regexp for kvm plugins to be aware of underscores in vm names (otherwise munin will not generate graphs bc. of too long filenames)
| plugins/virtualization/kvm_io | ||
|---|---|---|
| 85 | 85 |
result = {}
|
| 86 | 86 |
for pid in pids: |
| 87 | 87 |
cmdline = open("/proc/%s/cmdline" % pid, "r")
|
| 88 |
result[pid] = clean_vm_name(re.sub(r"^.*-name\x00([a-zA-Z0-9.-]*)\x00\-.*$",r"\1", cmdline.readline())) |
|
| 88 |
result[pid] = clean_vm_name(re.sub(r"^.*-name\x00([a-zA-Z0-9.-_]*)\x00\-.*$",r"\1", cmdline.readline()))
|
|
| 89 | 89 |
return result |
| 90 | 90 |
|
| 91 | 91 |
def list_pids(): |
Formats disponibles : Unified diff