Exemple #1
0
                         default=CFG_FILE,
                         help='configuration file to use')
 arg_parser.add_argument('--nodes',
                         action='store_true',
                         help='show comma-separated list of '
                         'host names the job is running on')
 arg_parser.add_argument('--verbose',
                         action='store_true',
                         help='show warnings')
 options = arg_parser.parse_args()
 job_id = get_numeric_job_id(options.job_id)
 with open(options.conf, 'r') as config_file:
     config = json.load(config_file)
 pbsnodes_output = subprocess.check_output(config['pbsnodes_cmd'])
 pbsnodes_parser = PbsnodesParser(options.verbose)
 nodes = pbsnodes_parser.parse(pbsnodes_output)
 loadaves = []
 mems = []
 netloads = []
 cput = None
 walltime = None
 core_count = 0
 node_names = []
 for node in nodes:
     if job_id in node.job_ids:
         loadaves.append(float(node.status['loadave']))
         mems.append(compute_memory(node))
         netloads.append(float(node.status['netload']))
         cpu_time = get_cpu_time(node, job_id)
         wall_time = get_walltime(node, job_id)
         if cpu_time: