

def get_system_cpu_times():
    'Return a named tuple representing the following CPU times:\n    user, nice, system, idle, iowait, irq, softirq.\n    '
    f = open('/proc/stat', 'r')
    try:
        values = f.readline().split()
    finally:
        f.close()
    values = values[1:8]
    values = tuple([(float(x) / _CLOCK_TICKS) for x in values])
    return nt_sys_cputimes(*values[:7])

dataset/ETHPy150Open packages/psutil/psutil/_pslinux.py get_system_cpu_times/original