示例#1
0
文件: check.py 项目: whouses/hardware
def megaraid(global_params, systems, unique_id):
    sets = search_item(systems, unique_id, "megaraid", "(.*)",
                       ['SerialNo', 'SasAddress', 'ControllerTemperature',
                        'VendorSpecific', 'RocTemperature'])
    groups = compare_sets.compare(sets)
    compare_sets.print_groups(global_params, groups, "Megaraid Controller")
    return groups
示例#2
0
文件: check.py 项目: whouses/hardware
def physical_megaraid_disks(global_params, systems, unique_id):
    sets = search_item(systems, unique_id, "pdisk", r"disk(\d+)",
                       ['Wwn', 'SasAddress', 'DriveTemperature'])
    groups = compare_sets.compare(sets)
    compare_sets.print_groups(global_params, groups,
                              "Physical Disks (Megaraid Controllers)")
    return groups
示例#3
0
文件: check.py 项目: whouses/hardware
def cpu(global_params, systems, unique_id):
    sets = search_item(systems, unique_id, "cpu", "(.*)",
                       ['bogomips', 'loops_per_sec', 'bandwidth',
                        'cache_size', '/temperature'])
    groups = compare_sets.compare(sets)
    compare_sets.print_groups(global_params, groups, "Processors")
    return groups
示例#4
0
文件: check.py 项目: whouses/hardware
def ipmi(global_params, systems, unique_id):
    sets = search_item(systems, unique_id, "ipmi",
                       "(?!(.*Temp$|.*RPM$)).*",
                       ['mac-address', 'ip-address'])
    groups = compare_sets.compare(sets)
    compare_sets.print_groups(global_params, groups, "IPMI SDR")
    return groups
示例#5
0
def compare_type(type_, check_func, title, global_params, bench_values,
                 unique_id, systems_groups):
    systems = utils.find_sub_element(bench_values, unique_id, type_)
    groups = check_func(systems, unique_id)
    compare_sets.compute_similar_hosts_list(
        systems_groups, compare_sets.get_hosts_list_from_result(groups))
    compare_sets.print_groups(global_params, groups, title)
示例#6
0
文件: check.py 项目: whouses/hardware
def logical_disks(global_params, systems, unique_id):
    sets = search_item(systems, unique_id, "disk", r"[a-z]d(\S+)",
                       ['simultaneous', 'standalone', 'id', 'serial_number',
                        'SMART/'], [],
                       ['when_failed', 'vendor', 'product', 'health'])
    groups = compare_sets.compare(sets)
    compare_sets.print_groups(global_params, groups, "Logical Disks")
    return groups
示例#7
0
def compare_type(type_, check_func, title, global_params,
                 bench_values, unique_id, systems_groups):
    systems = utils.find_sub_element(bench_values, unique_id, type_)
    groups = check_func(systems, unique_id)
    compare_sets.compute_similar_hosts_list(
        systems_groups,
        compare_sets.get_hosts_list_from_result(groups))
    compare_sets.print_groups(global_params, groups, title)
示例#8
0
文件: check.py 项目: whouses/hardware
def physical_hpa_disks(global_params, systems, unique_id):
    sets = search_item(systems, unique_id, "disk", r"(\d+)I:(\d+):(\d+)",
                       ['current_temperature_(c)',
                        'maximum_temperature_(c)',
                        'serial_number'])
    groups = compare_sets.compare(sets)
    compare_sets.print_groups(global_params, groups,
                              "Physical Disks (HP Controllers)")
    return groups
示例#9
0
文件: check.py 项目: whouses/hardware
def ahci(global_params, systems, unique_id):
    sets = search_item(systems, unique_id, "ahci", r".*")
    groups = compare_sets.compare(sets)
    compare_sets.print_groups(global_params, groups, "AHCI Controller")
    return groups
示例#10
0
文件: check.py 项目: whouses/hardware
def network_interfaces(global_params, systems, unique_id):
    sets = search_item(systems, unique_id, "network", "(.*)",
                       ['serial', 'ipv4'])
    groups = compare_sets.compare(sets)
    compare_sets.print_groups(global_params, groups, "Network Interfaces")
    return groups
示例#11
0
文件: check.py 项目: whouses/hardware
def memory_banks(global_params, systems, unique_id):
    sets = search_item(systems, unique_id, "memory", "bank(.*)", ['serial'])
    groups = compare_sets.compare(sets)
    compare_sets.print_groups(global_params, groups, "Memory Banks(RAM)")
    return groups
示例#12
0
文件: check.py 项目: whouses/hardware
def memory_timing(global_params, systems, unique_id):
    sets = search_item(systems, unique_id, "memory", "DDR(.*)")
    groups = compare_sets.compare(sets)
    compare_sets.print_groups(global_params, groups, "Memory Timing(RAM)")
    return groups
示例#13
0
文件: check.py 项目: whouses/hardware
def firmware(global_params, systems, unique_id):
    sets = search_item(systems, unique_id, "firmware", "(.*)")
    groups = compare_sets.compare(sets)
    compare_sets.print_groups(global_params, groups, "Firmware")
    return groups
示例#14
0
文件: check.py 项目: whouses/hardware
def systems(global_params, systems, unique_id):
    sets = search_item(systems, unique_id, "system", "(.*)",
                       ['serial', 'uuid'])
    groups = compare_sets.compare(sets)
    compare_sets.print_groups(global_params, groups, "System")
    return groups
示例#15
0
文件: check.py 项目: whouses/hardware
def hpa(global_params, systems, unique_id):
    sets = search_item(systems, unique_id, "hpa", "(.*)",
                       ['cache_serial_number', 'serial_number'])
    groups = compare_sets.compare(sets)
    compare_sets.print_groups(global_params, groups, "HPA Controller")
    return groups