def vm_cputime(vm_=None):
    host_cpus = __get_conn().getInfo()[2]

    def _info(vm_):
        dom = _get_domain(vm_)
        raw = dom.info()
        vcpus = int(raw[3])
        cputime = int(raw[4])
        cputime_percent = 0
        if cputime:
            # Divide by vcpus to always return a number between 0 and 100
            cputime_percent = (1.0e-7 * cputime / host_cpus) / vcpus
        return {
                'cputime': int(raw[4]),
                'cputime_percent': int('{0:.0f}'.format(cputime_percent))
               }
    info = {}
    if vm_:
        info[vm_] = _info(vm_)
    else:
        for vm_ in list_domains():
            info[vm_] = _info(vm_)
    return info
Removes JMX status files
dataset/ETHPy150Open saltstack/salt/salt/modules/virt.py/vm_cputime--crossover with--dataset/ETHPy150Open serverdensity/sd-agent/utils/jmx.py/JMXFiles.clean_status_file