John Holt wrote:
> On 2008-01-26 00:08:38 -0500, Kanhef 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
>> 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.
In a terminal window use e.g. the command 'ac', which gives (on my OSX
iMac24:~ otto$ ac
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
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 >> Stay informed about: Logout items?