Revision 6dbacc3b
Added by David Sorber over 9 years ago
| software/misc/checker.py | ||
|---|---|---|
|
TO_EMAIL = 'baranovich@gmail.com'
|
||
|
|
||
|
RAID_DEVS = ['md0']
|
||
|
BLOCK_DEVS = ['sda', 'sdb', 'sdc', 'sdd']
|
||
|
BLOCK_DEVS = ['sda', 'sdb', 'sdc', 'sdd', 'sde', 'sdf']
|
||
|
|
||
|
SEP = '-' * 80
|
||
|
|
||
| ... | ... | |
|
output.append(cmd_out.decode('utf-8').strip())
|
||
|
output.append('{:s}\n'.format(SEP))
|
||
|
|
||
|
# Check software RAID devices
|
||
|
raid_errors, raid_output = check_raid(RAID_DEVS)
|
||
|
errors.extend(raid_errors)
|
||
|
output.extend(raid_output)
|
||
|
|
||
|
# Report df -h (disk utilization)
|
||
|
cmd_out = subprocess.check_output('df -h', shell=True)
|
||
|
output.append(cmd_out.decode('utf-8').strip())
|
||
| ... | ... | |
|
smart_errors, smart_output = check_smart(BLOCK_DEVS)
|
||
|
errors.extend(smart_errors)
|
||
|
output.extend(smart_output)
|
||
|
|
||
|
# Check software RAID devices
|
||
|
raid_errors, raid_output = check_raid(RAID_DEVS)
|
||
|
errors.extend(raid_errors)
|
||
|
output.extend(raid_output)
|
||
|
|
||
|
# If no errors prepend "all okay" message
|
||
|
should_send = False
|
||
| software/misc/display.py | ||
|---|---|---|
|
|
||
|
hostname = subprocess.check_output('hostname', shell=True).strip()
|
||
|
|
||
|
ip_addr = get_ipv4_addr('enp2s0')
|
||
|
ip_addr = get_ipv4_addr('enp3s0')
|
||
|
root_stats = get_fs_usage('/dev/sda2')
|
||
|
storage_stats = get_fs_usage('/dev/md0')
|
||
|
|
||
Modifying my support scripts after upgrading phalanx.