From: "Nico Kadel-Garcia" <nkadel@bellatlantic.net>
Subject: Re: trimming wtmp
Date: Wed, 15 Jan 2003 04:28:18 GMT [thread overview]
Message-ID: <Cr5V9.55249$uL2.20597@nwrddc01.gnilink.net> (raw)
In-Reply-To: 3E2355D6.794B@maths.usyd.edu.au
"Paul Szabo" <psz@maths.usyd.edu.au> 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.
next prev parent reply other threads:[~2003-01-15 4:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-13 20:06 trimming wtmp Daniel Berger
2003-01-14 0:12 ` Paul Szabo
2003-01-15 4:28 ` Nico Kadel-Garcia [this message]
2003-01-15 4:42 ` Stuart Fuller
2003-01-15 14:36 ` Nico Kadel-Garcia
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox