Projet

Général

Profil

Révision 5715bb24

ID5715bb24087d832466e6c313c6d40787d98bac49
Parent 8537e6fd
Enfant 403bba18

Ajouté par Stanislav Kopp il y a plus de 10 ans

fixed regex for "vm_name" resolv, so VMs with dash in the name will be
displayed correctly

Voir les différences:

plugins/virtualization/kvm_cpu
68 68
    result = {}
69 69
    for pid in pids:
70 70
        cmdline = open("/proc/%s/cmdline" % pid, "r")
71
        result[pid] = clean_vm_name(re.sub(r"^.*-name\x00([a-zA-Z0-9.-_]*)\x00\-.*$",r"\1", cmdline.readline()))
71
        result[pid] = clean_vm_name(re.sub(r"^.*-name\x00([a-zA-Z0-9.-_-]*)\x00\-.*$",r"\1", cmdline.readline()))
72 72
    return result
73 73
    
74 74
def list_pids():

Formats disponibles : Unified diff