()
return scputimes(*fields)
Return a named tuple representing the following system-wide
    CPU times:
    (user, nice, system, idle, iowait, irq, softirq [steal, [guest,
     [guest_nice]]])
    Last 3 fields may not be available on all Linux kernel versions.
Return a named tuple representing the following system-wide
    CPU times:
    (user, nice, system, idle, iowait, irq, softirq [steal, [guest,
     [guest_nice]]])
    Last 3 fields may not be available on all Linux kernel versions.
Return a named tuple representing the following system - wide CPU times : ( user nice system idle iowait irq softirq [ steal [ guest [ guest_nice ]]] ) Last 3 fields may not be available on all Linux kernel versions .
def cpu_times():
    """Return a named tuple representing the following system-wide
    CPU times:
    (user, nice, system, idle, iowait, irq, softirq [steal, [guest,
     [guest_nice]]])
    Last 3 fields may not be available on all Linux kernel versions.
    """
    with open('/proc/stat', 'rb') as f:
        values = f.readline().split()
    fields = values[1:len(scputimes._fields) + 1]
    fields = [float(x) / CLOCK_TICKS for x in fields]
    return scputimes(*fields)
def cpu_times ( ) : with open ( '/proc/stat' , 'rb' ) as f : values = f . readline ( ) . split ( ) fields = values [ 1 : len ( scputimes . _fields ) + 1 ] fields = [ float ( x ) / CLOCK_TICKS for x in fields ] return scputimes ( * fields )