Spinlanders,
I have some software, written in Perl, for NMR accounting.
The current version has been tested for Linux (RH 7.3), but it includes
code (some commented) which should work for SGI's. I have written this
program many times in many languages, but only recently in Perl. It is not
fancy, and will require you to do some editing. Sorry for that. Maybe someone
who knows Perl well can give me some pointers.
The program searches an unedited system log for messages that contain the word "session"
and computes elapsed time based on the times that the session was "opened" and "closed".
This will be the time that the user was "logged in" which, I think is what most managers are
interested in. (Process accounting, by contrast, will report time use for each process. Thus,
if the user has 3 shells open for 1 hour, process accounting reports 3 hours of use.)
The software is available at
http://uwadmnweb.uwyo.edu/chemistry/research/NMR/software.asp
<
http://uwadmnweb.uwyo.edu/chemistry/research/NMR/software.asp> .
Doug
Notes:
1) On my system, the "system log" is derived from /var/log/messages. I edit a copy of it for the
time periods that I am interested in. The logging programs are currently in
/var/www/cgi-bin/nmrlog and the logs are stored in /var/www/cgi-bin/nmrlog/cal2005.
These directories are easily changed in the file nmrlog.pl.
2) The program compiles time used in PRIME and NONPrime periods (the default prime time
period is 8:00-17:00). This is easily changed in the file nmrlog.pl.
3) You need a copy of the /etc/passwd and /etc/group files in the same directory as the log file.
4) There are two files nmrlog.pl and nmrLogLib.pm. Look at nmrlog.pl first.
5) Perl is both cross platform and free. if you don't have it, see
http://aspn.activestate.com/ASPN/Perl.
Dr. Doug Wheeler
Chemistry Department
Department 3838
1000 East University Avenue
Laramie, WY 82071
307-766-2093
dwheeler_at_uwyo.edu
Received on Mon Jul 11 2005 - 13:24:58 MST