[comp.unix.admin] keeping wtmp

lubkt@vax1.cc.lehigh.edu (02/04/91)

There has been considerable discussions over wtmp, mostly with respect
to its size. On our network of Suns, these files keep only daily
information, and after a day get automatically resetted. I am not
running any cron to cut their sizes, but I am running accounting (the
standard ones). Is it true that the accounting program is resetting my
wtmp? I want retain wtmp records for a period longer than a day.

B.
--------------------
Binod Taterway				LUBKT@vax1.CC.Lehigh.EDU
User Consultant				bt00@PL118a.CC.Lehigh.EDU
Lehigh University, Beth, PA.
(215) 758-3984.

clewis@ferret.ocunix.on.ca (Chris Lewis) (02/08/91)

In article <194.27ac936a@vax1.cc.lehigh.edu> lubkt@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.
-- 
Chris Lewis, Phone: (613) 832-0541, Internet: clewis@ferret.ocunix.on.ca
UUCP: uunet!mitel!cunews!latour!ecicrl!clewis
Moderator of the Ferret Mailing List (ferret-request@eci386)
Psroff enquiries: psroff-request@eci386, current patchlevel is *7*.

davel@bedbug.arc.nasa.gov (Dave Liebreich) (02/09/91)

In article <1298@ecicrl.ocunix.on.ca> clewis@ferret.ocunix.on.ca (Chris Lewis) writes:
   In article <194.27ac936a@vax1.cc.lehigh.edu> lubkt@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@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