On 2008-01-26 00:08:38 -0500, Kanhef <Kanhef DeleteThis @mailinator.com> said:
> I'm trying to automatically record how long my computer can run without
> rebooting. (Mostly to brag about it.) Doing this with a small shell
> script:
>
> Kanhef% uptime >> bragTimes.txt
> Kanhef% date >> bragTimes.txt
>
> I know shutdown items haven't been possible in OS X, but since I rarely
> logout except when shutting down, a logout item would work just as
> well. Is there any way of doing this?
>
> My backup plan is a cronjob to record the uptime every hour, but that's
> a messier solution.
You could just extract the information from the system log in the
/var/log directory. Startup and Shutdown events are recorded in the
log.
You could also use the "uptime" command in a Unix terminal window.
There are probably better ways than these, I just don't know of them.
--
John Holt