
Signature
I hear what you are saying.....that doesn't mean I agree with you....Just that
I am nodding my head to placate you and silence your futile attempts to win the
argument.
> 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
[quoted text clipped - 9 lines]
> 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.

Signature
John Holt
Otto van Verseveld - 23 May 2008 18:53 GMT
>> 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
[quoted text clipped - 16 lines]
>
> There are probably better ways than these, I just don't know of them.
In a terminal window use e.g. the command 'ac', which gives (on my OSX
10.4.11):
iMac24:~ otto$ ac
total 2207.24
iMac24:~ otto$
By typing 'man ac' in a Terminal you can get more related info, or
parameters. For example when I enter 'ac -d' you'll get the following
output:
iMac24:~ otto$ ac -d
Dec 28 total 2.84
Dec 29 total 5.49
Dec 30 total 0.60
...
May 16 total 9.75
May 17 total 8.42
May 18 total 4.85
May 19 total 4.97
May 20 total 2.00
May 21 total 2.93
May 22 total 3.10
May 23 total 1.99