keeping wtmp
Dave Liebreich
davel at bedbug.arc.nasa.gov
Sat Feb 9 03:40:14 AEST 1991
In article <1298 at ecicrl.ocunix.on.ca> clewis at ferret.ocunix.on.ca (Chris Lewis) writes:
In article <194.27ac936a at vax1.cc.lehigh.edu> lubkt at vax1.cc.lehigh.edu writes:
>Is it true that the accounting program is resetting my wtmp?
Probably. The System V accounting certainly does, and the Sun accounting
is presumably summarizing it too.
>I want retain wtmp records for a period longer than a day.
Study the accounting software - it's probably already keeping
wtmp records in a more compressed form.
I must have missed the original post. On our Sun, I have modified the
4.1 accounting scripts to append each night's wtmp to
/var/adm/acct/wtmplog - diff follows.
Good Luck
*** runacct.orig Tue Sep 18 13:59:53 1990
--- runacct Tue Sep 18 14:01:05 1990
***************
*** 337,342 ****
--- 337,345 ----
rm -f nite/ptacct*.${_date} nite/ctacct.${_date}
rm -f nite/wtmp.${_date} nite/wtmperror${_date} nite/active${_date}
mv nite/tmpwtmp nite/owtmp
+ # davel 9/18/90
+ cat nite/owtmp >> wtmplog
+ # davel 9/18/90
echo "system accounting completed at `date`" >> ${_active}
logger -p daemon.err "********** SYSTEM ACCOUNTING COMPLETED **********"
echo "COMPLETE" > ${_statefile}
--
=========================================================================
Dave Liebreich davel at george.arc.nasa.gov
Member Technical Staff (415) 604-4794
Sterling Software @ NASA Ames Research Center
Mail Stop 233-15
Moffett Field, CA 94035
"The opinions expressed above are not necessarily those of my employer"
doo dah doo dah
More information about the Comp.unix.admin
mailing list