|
|
Keep track of a Mac's usage pattern
Wierd - my man page seems to have details. ac gets information from /var/log/wtmp (written to by by init(8) and login(8)) which is the same place that 'last' gets information from. On OSX the wtmp file gets rotated monthly by /etc/periodic/monthly/500.monthly to wtmp.#.gz
The ac man page suggests that the units are hours and testing with ac -p ; sleep 36 ; ac -p seems to confirm this. Realize that ac measures total login time in the Unix sense, not in the OSX sense. If you have multiple shells open (check the output of 'w') then login time will grow faster than 1 hour per real hour of time.
There's also wierd behavior when using ac on rotated wtmp files. When the logs get rotated at end-of-month it's possible for a user to still be logged in. For example a wtmp file for November shows: $ last -f wtmp.2 jsells | head -1 jsells console tinywife.local Tue Nov 30 21:55 still logged inThis confuses ac into thinking that that session is still logged in as of the date that you run it! So: $ ac -d -w wtmp.2 jsells | tail -4 Nov 28 total 24.00 Nov 29 total 24.00 Mar 15 total 2543.98 Mar 16 total 23.88-m |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|