diff --git a/bin/seconds_since_wakeup.sh b/bin/seconds_since_wakeup.sh index c5f4762..f2d2ab0 100755 --- a/bin/seconds_since_wakeup.sh +++ b/bin/seconds_since_wakeup.sh @@ -1,6 +1,6 @@ #! /bin/bash -last_wakeup_str=`grep "Enabling non-boot CPUs ..." /var/log/kern.log | tail -n 1 | cut -d ' ' -f 1-3` +last_wakeup_str=`grep "Enabling non-boot CPUs ..." /var/log/kern.log | tail -n 1 | egrep -o '^.*..:..:..' | head -1` [ -z "$last_wakeup_str" ] && echo -1 && exit 1 wakeup_unix="$(date --date="$last_wakeup_str" +%s)"