Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / May 2008



Tip: Looking for answers? Try searching our database.

Logout items?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kanhef - 26 Jan 2008 05:08 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
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.

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.

John Holt - 26 Jan 2008 21:20 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 - 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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.