def _main(options): 'Command line entry point.' hrdw = [] detect_areca(hrdw) detect_hpa(hrdw) detect_megacli(hrdw) detect_disks(hrdw) if not detect_system(hrdw): sys.exit(1) detect_ipmi(hrdw) detect_infiniband(hrdw) detect_temperatures(hrdw) detect_utils.get_ddr_timing(hrdw) detect_utils.ipmi_sdr(hrdw) detect_rtc_clock(hrdw) _, output = cmd("dmesg") parse_dmesg(hrdw, output) bios_hp.dump_hp_bios(hrdw) if "benchmark_cpu" in options: bm_cpu.cpu_perf(hrdw) if "benchmark_mem" in options: bm_mem.mem_perf(hrdw) if "benchmark_disk" in options: bm_disk.disk_perf(hrdw, destructive=options['benchmark_disk_destructive']) hrdw = clean_tuples(hrdw) if "human" in options.keys(): pprint.pprint(hrdw) else: print(json.dumps(hrdw))
def _main(options): 'Command line entry point.' hrdw = [] detect_hpa(hrdw) detect_megacli(hrdw) detect_disks(hrdw) if not detect_system(hrdw): sys.exit(1) detect_ipmi(hrdw) detect_infiniband(hrdw) detect_temperatures(hrdw) detect_utils.get_ddr_timing(hrdw) detect_utils.ipmi_sdr(hrdw) _, output = cmd("dmesg") parse_dmesg(hrdw, output) if "benchmark_cpu" in options: bm_cpu.cpu_perf(hrdw) if "benchmark_mem" in options: bm_mem.mem_perf(hrdw) if "benchmark_disk" in options: bm_disk.disk_perf(hrdw, destructive=options['benchmark_disk_destructive']) if "human" in options.keys(): pprint.pprint(hrdw) else: print(json.dumps(hrdw))
def main(): """Command line entry point.""" os.environ["LANG"] = "en_US.UTF-8" args = parse_args(sys.argv[1:]) hrdw = [] hrdw.extend(areca.detect()) hrdw.extend(hpacucli.detect()) hrdw.extend(megacli.detect()) hrdw.extend(diskinfo.detect()) system_info = system.detect() if not system_info: sys.exit(1) hrdw.extend(system_info) hrdw.extend(ipmi.detect()) hrdw.extend(ib.detect()) hrdw.extend(sensors.detect_temperatures()) detect_utils.get_ddr_timing(hrdw) detect_utils.ipmi_sdr(hrdw) detect_rtc_clock(hrdw) detect_auxv(hrdw) parse_dmesg(hrdw) bios_hp.dump_hp_bios(hrdw) if args.benchmark: if 'cpu' in args.benchmark: bm_cpu.cpu_perf(hrdw) if 'mem' in args.benchmark: bm_mem.mem_perf(hrdw) if 'disk' in args.benchmark: bm_disk.disk_perf(hrdw, destructive=args.benchmark_disk_destructive) hrdw = detect_utils.clean_tuples(hrdw) hrdw = list(filter(None, hrdw)) if args.human: pprint.pprint(hrdw) else: print(json.dumps(hrdw))
def _main(options): 'Command line entry point.' hrdw = [] detect_hpa(hrdw) detect_megacli(hrdw) detect_disks(hrdw) detect_system(hrdw) detect_ipmi(hrdw) detect_infiniband(hrdw) detect_temperatures(hrdw) detect_utils.get_ddr_timing(hrdw) detect_utils.ipmi_sdr(hrdw) status, output = cmd("dmesg") parse_dmesg(hrdw, output) if "human" in options.keys(): pprint.pprint(hrdw) else: print(json.dumps(hrdw))
def main(): """Command line entry point.""" os.environ["LANG"] = "en_US.UTF-8" args = parse_args(sys.argv[1:]) hrdw = [] detect_areca(hrdw) detect_hpa(hrdw) detect_megacli(hrdw) detect_disks(hrdw) if not detect_system(hrdw): sys.exit(1) detect_ipmi(hrdw) detect_infiniband(hrdw) detect_temperatures(hrdw) detect_utils.get_ddr_timing(hrdw) detect_utils.ipmi_sdr(hrdw) detect_rtc_clock(hrdw) detect_auxv(hrdw) parse_dmesg(hrdw) bios_hp.dump_hp_bios(hrdw) if args.benchmark: if 'cpu' in args.benchmark: bm_cpu.cpu_perf(hrdw) if 'mem' in args.benchmark: bm_mem.mem_perf(hrdw) if 'disk' in args.benchmark: bm_disk.disk_perf(hrdw, destructive=args.benchmark_disk_destructive) hrdw = clean_tuples(hrdw) if args.human: pprint.pprint(hrdw) else: print(json.dumps(hrdw))