Re: 2.4.x kernel uptime counter problem

From: Bill Davidsen
Date: Fri Jan 20 2006 - 10:17:11 EST


Jan Engelhardt wrote:
You can use:
last -xf /var/run/utmp runlevel

to get true uptime in this instance.


Or use some dedicated programs, IIRC there is a "uprecords" program
(http://podgorny.cz/moin/Uptimed). Does require no reboot and should work right away.

I never understood uptime anyway, the boot time, to the second, is available in /proc/stat (btime), and it isn't that hard to turn it into whatever format you find human readable. I have a perl script which presents uptime as fractional days, days, hours, min, sec, and/or boot time. Took me about two minutes to write.

--
-bill davidsen (davidsen@xxxxxxx)
"The secret to procrastination is to put things off until the
last possible moment - but no longer" -me
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/