def get_pid_cpu(pid):
 cmd = ('ps -o cpuid -L -p %s' % pid)
 cpu_pid = system_output(cmd)
 if (not cpu_pid):
  return []
 return list(set([_.strip() for _ in cpu_pid.splitlines()]))

def get_pid_cpu ( pid ) : cmd = ( 'ps -o cpuid -L -p %s' % pid ) cpu_pid = system_output ( cmd ) if ( not cpu_pid ) : return [ ] return list ( set ( [ _ . strip ( ) for _ in cpu_pid . splitlines ( ) ] ) )
get the process used cpus .