logadm(1M) Problem
Crist Clark
Crist.Clark at globalstar.com
Tue Sep 2 18:12:11 EDT 2008
I'm missing something with logadm(1M). I want to rotate a log
file once per month. I'd like to switch files at 0000 on the
first of the month to be exact. This seems to be too complicated
for the logadm.conf file. But that's OK. It's trivial to do
from a crontab(1).
So this is what the crontab entry looks like,
0 0 1 * * logadm -p now -C 24 -t '/var/log/soxauth.\%Y\%m' -a 'kill
-HUP `cat /var/run/syslog.pid`' /var/log/soxauth
And it works fine (mostly) as expected. It fires off when the
clock rolls over from one month to the next. But the problem
is that it leaves this line,
/var/log/soxauth -P 'Mon Sep 1 07:00:00 2008'
In the /etc/logadm.conf file. The problem with this now is
that this entry gets processed everyday when root's crontab(1)
runs logadm(1M) with no arguments. The result being that
logadm(1M) now uses the default criteria to rotate that file,
"-s 1b -p 1w", which means I get undesired rotations every
week.
Am I misunderstanding how logadm(1M) is meant to work? I didn't
expect it to write anything to logadm.conf unless I give it the
"-w" argument.
I found a workaround, I added a "-p never" argument to the
entry in logadm.conf, but I am still worried about the surprising
(to me anyway) behavior it had in the first place and wonder if
that breaks something else. How should I be using logadm(1M) in
this case?
BB<information contained in this e-mail message is confidential, intended
only for the use of the individual or entity named above. If the reader
of this e-mail is not the intended recipient, or the employee or agent
responsible to deliver it to the intended recipient, you are hereby
notified that any review, dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this e-mail
in error, please contact postmaster at globalstar.com
More information about the sunmanagers
mailing list