added used_space_path to config
This commit is contained in:
@@ -26,6 +26,7 @@ sleep_time = 0.5
|
|||||||
cpu_load = True
|
cpu_load = True
|
||||||
cpu_temp = True
|
cpu_temp = True
|
||||||
used_space = True
|
used_space = True
|
||||||
|
used_space_path = '/mnt'
|
||||||
voltage = True
|
voltage = True
|
||||||
sys_clock_speed = True
|
sys_clock_speed = True
|
||||||
swap = True
|
swap = True
|
||||||
|
|||||||
@@ -301,13 +301,16 @@ if __name__ == '__main__':
|
|||||||
# delay the execution of the script
|
# delay the execution of the script
|
||||||
time.sleep(config.random_delay)
|
time.sleep(config.random_delay)
|
||||||
|
|
||||||
|
if hasattr(config, 'used_space_path'): used_space_path = config.used_space_path
|
||||||
|
else: used_space_path = '/'
|
||||||
|
print(used_space_path)
|
||||||
# collect the monitored values
|
# collect the monitored values
|
||||||
if config.cpu_load:
|
if config.cpu_load:
|
||||||
cpu_load = check_cpu_load()
|
cpu_load = check_cpu_load()
|
||||||
if config.cpu_temp:
|
if config.cpu_temp:
|
||||||
cpu_temp = check_cpu_temp()
|
cpu_temp = check_cpu_temp()
|
||||||
if config.used_space:
|
if config.used_space:
|
||||||
used_space = check_used_space('/')
|
used_space = check_used_space(used_space_path)
|
||||||
if config.voltage:
|
if config.voltage:
|
||||||
voltage = check_voltage()
|
voltage = check_voltage()
|
||||||
if config.sys_clock_speed:
|
if config.sys_clock_speed:
|
||||||
|
|||||||
Reference in New Issue
Block a user