logrotate failure

Gene Heskett gene.heskett at verizon.net
Tue Nov 21 04:27:16 UTC 2006


On Monday 20 November 2006 22:35, David G. Miller wrote:
>Gene Heskett wrote:
>> On Monday 20 November 2006 20:17, Todd Zullinger wrote:
>>> >Gene Heskett wrote:
>>>>> >>>[root at fraud logrotate.d]# rpm -q --whatprovides
>>>>> >>> /etc/logrotate.d/named bind-9.2.4-16.EL4
>>>> >>
>>>> >> And just in case rpm exits on the first answer as opposed to all
>>>> >> answers, what would it say on a system without bind?  An
>>>> >> intrigueing question that..
>>> >
>>> >It should say this:
>>> >
>>> >$ rpm -q --whatprovides /etc/logrotate.d/named
>>> >error: file /etc/logrotate.d/named: No such file or directory
>>> >
>>> >If the file /etc/logrotate.d/named does exist and was created
>>> >manually, it would look more like this:
>>> >
>>> >$ sudo touch /etc/logrotate.d/named
>>> >$ rpm -q --whatprovides /etc/logrotate.d/named
>>> >file /etc/logrotate.d/named is not owned by any package
>>
>> Ok, I've removed bind again wlthough bind-chroot threw an error back
>> to rpm.  Then I removed /etc/sysconfig/named* and
>> /etc/logrotate.d/named*.
>
>Sorry.  I missed that you had also installed bind-chroot.  They both go
>or they both stay.  A little late now but it might have been interesting
>to see the dates on the /etc/logrotate.d/named file.  Might have been a
>clue as to when and how it got there.
>
>> The I re-ran logrotate -vf /etc/logrotate.conf, and everything worked
>> except the SIGHUP to fetchmail, which is still using the
>> original /var/log/fetchmail.log.2 for its active logging file.
>
>Can't help you on the fetchmail pid problem.  That IS very strange.
>When fetchmail is running, which pid in the .fetchmail.pid file matches
>what ps aux says?
>
The first line is the correct line.

And I've found a way to survey this and see how many .pid files 
are 'dirty' containing more than the single line containing the pid of 
the process.
=================
[root at coyote ~]# head  `locate *.pid`

==> /home/gene/.fetchmail.pid <==
12654
90

==> /var/lib/pgsql/data/postmaster.pid <==
4867
/var/lib/pgsql/data
  5432001         0

==> /var/run/sendmail.pid <==
4935
/usr/sbin/sendmail -bd -q1h

==> /var/run/sm-client.pid <==
4944
/usr/sbin/sendmail -L sm-msp-queue -Ac -q1h

[root at coyote ~]#
==========
Head as you can see reports the filename, and by default the first 10 
lines of the file.  Then I removed from the output above, those that seem 
to use the .pid file correctly in the it only had one line, the pid of 
the process.

For all such files where the logrotate script uses cat to obtain the pid, 
those would fail on the above processes.

The fact that head also spits out the filename would prevent the use of a 
head -n1 syntax, but a head -qn1 might work.  And that will fail in some 
instances because not all pid files have a linefeed after the number. But 
it would work if the locate weren't used.

>Cheers,
>Dave
>
>--
>Politics, n. Strife of interests masquerading as a contest of
> principles. -- Ambrose Bierce

Thanks.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2006 by Maurice Eugene Heskett, all rights reserved.




More information about the users mailing list