Hi,
It seems I manage to give the autoshutdown-script some headache when I define an uptime range of 9..2 (i.e. 9AM to 2AM). I think this "bug" will be present for other combos as well when the end-time number is less than typical up-time numbers. So say if I set it to 9-23, the sleep function when encounting up-time period works perfectly, but whith 9-2 I get this repated in my log so many times it's difficult to find the interesting stuff (if any
) :
Code
autoshutdown[26927]: INFO: ' new supervision cycle started - check active hosts or processes'
autoshutdown[26927]: INFO: ' Checking the time: stay up or shutdown ...'
autoshutdown[26927]: INFO: ' System is in Stayup-Range. No need to do anything. Sleeping ...'
autoshutdown[26927]: INFO: ' Sleeping until 1:55 -> 0 seconds'
autoshutdown[26927]: INFO: ' sleep for 180s.'
autoshutdown[26927]: INFO: '------------------------------------------------------'
autoshutdown[26927]: INFO: ' new supervision cycle started - check active hosts or processes'
autoshutdown[26927]: INFO: ' Checking the time: stay up or shutdown ...'
autoshutdown[26927]: INFO: ' System is in Stayup-Range. No need to do anything. Sleeping ...'
autoshutdown[26927]: INFO: ' Sleeping until 1:55 -> 0 seconds'
autoshutdown[26927]: INFO: ' sleep for 180s.'
autoshutdown[26927]: INFO: '------------------------------------------------------'
autoshutdown[26927]: INFO: ' new supervision cycle started - check active hosts or processes'
autoshutdown[26927]: INFO: ' Checking the time: stay up or shutdown ...'
autoshutdown[26927]: INFO: ' System is in Stayup-Range. No need to do anything. Sleeping ...'
autoshutdown[26927]: INFO: ' Sleeping until 1:55 -> 0 seconds'
autoshutdown[26927]: INFO: ' sleep for 180s.'
autoshutdown[26927]: INFO: '------------------------------------------------------'
autoshutdown[26927]: INFO: ' new supervision cycle started - check active hosts or processes'
autoshutdown[26927]: INFO: ' Checking the time: stay up or shutdown ...'
autoshutdown[26927]: INFO: ' System is in Stayup-Range. No need to do anything. Sleeping ...'
autoshutdown[26927]: INFO: ' Sleeping until 1:55 -> 0 seconds'
autoshutdown[26927]: INFO: ' sleep for 180s.'
Display More
Basically, it spams my log with meaningless info
However, it should still shutdown my NAS when in shutdown-range, so it's really not that big of a problem; the script still works. But is it not possible to avvoid this somehow? It seems the error is the negative TIMETOSLEEP?
Code
autoshutdown[32297]: DEBUG: 'FAKE-Mode: _check_clock(): CLOCKCHECK: 20; CLOCKSTART: 9 ; CLOCKEND: 2 -> forced to stay up'
autoshutdown[32297]: DEBUG: 'FAKE-Mode: _check_clock(): TIMETOSLEEP: -19'
autoshutdown[32297]: DEBUG: 'FAKE-Mode: _check_clock(): SECONDSTOSLEEP: 0'
autoshutdown[32297]: DEBUG: 'FAKE-Mode: _check_clock(): MINUTESTOSLEEP: '
autoshutdown[32297]: DEBUG: 'FAKE-Mode: _check_clock(): Final: SECONDSTOSLEEP: 0'
autoshutdown[32297]: DEBUG: 'FAKE-Mode: _check_clock(): TIMEHOUR: - TIMEMINUTES: '
autoshutdown[32297]: INFO: 'FAKE-Mode: System is in Stayup-Range. No need to do anything. Sleeping ...'
autoshutdown[32297]: INFO: 'FAKE-Mode: Sleeping until : -> 0 seconds'