Hello Corbob,
I will assume you are familiar with writing scripts and the command
line (from the terminal application). I have at least two ideas you
should be able to use to collect the information you need.
[1] From a terminal window, type
apropos account
to get the following list...
ac(8) - connect time accounting
acct(2) - enable or disable process accounting
acct(5) - execution accounting file
accton(8) - enable/disable system accounting
These are the man pages that describe the per user accounting that was
introduced in AT&T Unix a *long* time ago (15-20 years ago?). For
example, on my system...
ac -d
lists the following information...
Aug 9 total 147.92
Aug 10 total 23.96
Aug 11 total 24.00
Aug 13 total 47.96
Aug 14 total 19.81
(I am not sure why the system charged me for 148 hours of use in a 24
hour day :-) on August 9th. The command
ac -p
lists the following information...
maniac 263.67
total 263.67
which should sum to the values above. Ac is a very simple program, if
you need more complicated accounting (other than hours per day), you
will have to write a program. In case you don't know, enter
man 8 ac
to get information about the system administrative program named ac or
enter
man 1 man
to get information about the man program itself.
[2] Customize the system with a "login hook" and "logoff hook". For
information, check out...
http://developer.apple.com/techpubs/macosx/Essentials/SystemOverview/BootingLogin/Customization_Techniques.html
which describes a number of customizations. Basically, you can specify
a script or application which runs at login and logout (as well as
disable the reboot and shutdown commands). Check related pages on
Apple's web site for more detail.
If you need to search for more data, I suggest search phrases such as
"acct", "accounting", "login hook", "macosx", "unix" and similar
phrases for more sites to get information.
--Maniac |