()
Return a list of namedtuple representing the CPU times
    for every CPU available on the system.
Return a list of namedtuple representing the CPU times
    for every CPU available on the system.
Return a list of namedtuple representing the CPU times for every CPU available on the system .
def per_cpu_times():
    """Return a list of namedtuple representing the CPU times
    for every CPU available on the system.
    """
    cpus = []
    with open('/proc/stat', 'rb') as f:
        # get rid of the first line which refers to system wide CPU stats
        f.readline()
        for line in f:
            if line.startswith(b'cpu'):
                values = line.split()
                fields = values[1:len(scputimes._fields) + 1]
                fields = [float(x) / CLOCK_TICKS for x in fields]
                entry = scputimes(*fields)
                cpus.append(entry)
        return cpus
def per_cpu_times ( ) : cpus = [ ] with open ( '/proc/stat' , 'rb' ) as f : # get rid of the first line which refers to system wide CPU stats f . readline ( ) for line in f : if line . startswith ( b'cpu' ) : values = line . split ( ) fields = values [ 1 : len ( scputimes . _fields ) + 1 ] fields = [ float ( x ) / CLOCK_TICKS for x in fields ] entry = scputimes ( * fields ) cpus . append ( entry ) return cpus