def get_node_cpu_times(reactor, runner, node, known_name, processes):
 process_list = list(processes)
 if (known_name in processes):
  delete_known_name = False
 else:
  process_list.append(known_name)
  delete_known_name = True
 parser = CPUParser(reactor)
 d = runner.run(node, (_GET_CPUTIME_COMMAND + [','.join(process_list)]), handle_stdout=parser.lineReceived)
 def get_parser_result(ignored):
  result = parser.result
  if (delete_known_name and (known_name in result)):
   del result[known_name]
  return result
 d.addCallback(get_parser_result)
 return d

def get_node_cpu_times ( reactor , runner , node , known_name , processes ) : process_list = list ( processes ) if ( known_name in processes ) : delete_known_name = False else : process_list . append ( known_name ) delete_known_name = True parser = CPUParser ( reactor ) d = runner . run ( node , ( _GET_CPUTIME_COMMAND + [ ',' . join ( process_list ) ] ) , handle_stdout = parser . lineReceived ) def get_parser_result ( ignored ) : result = parser . result if ( delete_known_name and ( known_name in result ) ) : del result [ known_name ] return result d . addCallback ( get_parser_result ) return d
get the cpu times for processes running on a node .