I seem to be having a problem with /proc/uptime. I've recently
installed ipaq-sleep, and I have pretty much the default settings,
dim:90 and sleep: 180, though I set apm:0 to sleep on AC. The problem
is that my uptime is just not correct, at least /proc/uptime is not
being updated. The screenshot I attached shows at 9:25am, it was up
0h1m, then it dimmed and slept. at 10:15am, my uptime showed 0h8m.
Surely more than 7 minutes are between 9:25 and 10:15am...
I'm running ICEwm, which I believe has the power button hooked up to
/usr/bin/power.sh...but I'm just letting ipaq-sleep handle the suspend
stuff.
Does anyone have any ideas?
Below is the bash script that I use for uptime:
#!/bin/bash
#
# mimic solaris uptime
#
temp=$(cat /proc/loadavg)
one=`echo ${temp%% *}`
five=`x=${temp#* } && echo ${x%% *}`
fifteen=`x=${temp#* } && y=${x#* } && echo ${y%% *}`
temp=$(cat /proc/uptime)
let upSeconds="${temp%%.*}"
let secs=$((${upSeconds}%60))
let mins=$((${upSeconds}/60%60))
let hours=$((${upSeconds}/3600%24))
let days=$((${upSeconds}/86400))
echo -n "`date +%l:%M%p` up ${days}d ${hours}h${mins}m, "
echo "load average: $one, $five, $fifteen"
__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com
This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:44:33 EDT