From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,271c3c51c4f7c28f X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-01-15 06:36:23 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn13feed!wn11feed!worldnet.att.net!199.45.49.37!cyclone1.gnilink.net!spamfinder.gnilink.net!nwrddc02.gnilink.net.POSTED!53ab2750!not-for-mail From: "Nico Kadel-Garcia" Newsgroups: comp.unix.tru64 References: <3E2355D6.794B@maths.usyd.edu.au> Subject: Re: trimming wtmp X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: Date: Wed, 15 Jan 2003 14:36:17 GMT NNTP-Posting-Host: 151.203.22.73 X-Complaints-To: abuse@verizon.net X-Trace: nwrddc02.gnilink.net 1042641377 151.203.22.73 (Wed, 15 Jan 2003 09:36:17 EST) NNTP-Posting-Date: Wed, 15 Jan 2003 09:36:17 EST Xref: archiver1.google.com comp.unix.tru64:9392 "Stuart Fuller" wrote in message news:hso20b.t55.ln@dadsys2.fuller.local... > Nico Kadel-Garcia wrote: > > > > > "Paul Szabo" wrote in message > > news:3E2355D6.794B@maths.usyd.edu.au... > >> Daniel Berger wrote: > >> > Is there a way to trim wtmp? Mine goes back years and has gotten huge. > >> > >> What we do, yearly, is (at a quiet time): > >> > >> cp -ip /usr/adm/wtmp /usr/adm/wtmp.2002 > >> echo -n '' > /usr/adm/wtmp > >> > >> so the system has a nice, small (empty) file to fill up again. > > > > Log rotation is an art form. Take a look at this approach: > > > > mv /usr/adm/wtmp /usr/adm/wtmp.{backup name} > > kill -HUP {syslog process ID} > > > > This way, you restart the syslog daemon correctly and the data continues > > to pour into the file descriptor of the original file even in its new > > location until you restart it. > > Umm, does syslog write to /usr/adm/wtmp? I don't think it does, so I don't > understand the purpose of restarting syslog ??? Damn, you're right. Still, moving aside is better. There's a *reason* log rotation is an art form, each one is slightly different.