Re: Multilog failing to rotate logfiles

Robert Fisher <[email protected]>
Newsgroups gmane.comp.djb.syslog
Message-ID <[email protected]>
Adrian Ho wrote:

>On Thu, Nov 25, 2004 at 06:40:28PM -0900, Robert Fisher wrote:
>  
>
>>I am having a small problem with Multilog.  It appears that it is not 
>>auto rotating the logs. My commands for the log files are
>>
>>/usr/local/bin/multilog t s10000000 /var/log/qmail/smtpd
>>/usr/local/bin/multilog t s10000000 /var/log/qmail
>>/usr/local/bin/multilog t s10000000 /var/log/qmail/pop3d
>>
>>So in this case, it should rotate the logs at 10MB approx.  However, all 
>>three logs are going well beyond that and filling up my disk space.
>>    
>>
>
>It's not clear what your problem is.  Do you have up to 10 log files in
>each of the above directories, each of which is no larger than 10000000
>bytes?
>
>If yes, that's exactly what you told multilog to keep (you may have
>missed the "n" option in the multilog man page).
>
>If not, what's the output of:
>
>  ls -l /var/log/qmail{,/smtpd,/pop3d}
>  
>
[root@ns qmail]# ls -lh
???? 738M
-rwxr--r--    1 qmaill   nofiles       11M 11?? 20 23:58 
@40000000419f5bfa2f617a7c.s
-rwxr--r--    1 qmaill   nofiles       23M 11?? 21 15:50 
@4000000041a03b4312b5351c.s
-rwxr--r--    1 qmaill   nofiles       86K 11?? 21 23:58 
@4000000041a0ad7a2bc6f66c.s
-rwxr--r--    1 qmaill   nofiles       46M 11?? 22 11:33 
@4000000041a14ff00cded29c.s
-rwxr--r--    1 qmaill   nofiles      196K 11?? 22 23:32 
@4000000041a1fefa1c8640f4.s
-rwxr--r--    1 qmaill   nofiles       93M 11?? 23 23:47 
@4000000041a3507a21a11ba4.s
-rwxr--r--    1 qmaill   nofiles      187M 11?? 24 10:58 
@4000000041a3eb1f16982824.s
-rwxr--r--    1 qmaill   nofiles      260K 11?? 24 23:57 
@4000000041a4a1fa2ea8d4f4.s
-rwxr--r--    1 qmaill   nofiles      374M 11?? 25 11:03 
@4000000041a53db22956e89c.s
-rw-r--r--    1 qmaill   nofiles      209K 11?? 25 21:11 current
-rwxr-x---    1 qmaill   root            0 10??  6 13:47 lock
drwxr-x---    2 qmaill   root         4.0K 11?? 25 11:04 pop3d
drwxr-x---    2 qmaill   root         4.0K 11?? 25 11:04 smtpd
-rw-r--r--    1 qmaill   nofiles         0 11?? 16 10:26 state
[root@ns qmail]# ls -lh pop3d/
???? 3.9G
-rwxr--r--    1 qmaill   nofiles       61M 11?? 20 23:59 
@40000000419f5bfa39eb04cc.s
-rwxr--r--    1 qmaill   nofiles      124M 11?? 21 15:52 
@4000000041a03b4312b1648c.s
-rwxr--r--    1 qmaill   nofiles      474K 11?? 21 23:59 
@4000000041a0ad7a2bc321f4.s
-rwxr--r--    1 qmaill   nofiles      249M 11?? 22 11:32 
@4000000041a14ff00ce231e4.s
-rwxr--r--    1 qmaill   nofiles      1.4M 11?? 22 23:59 
@4000000041a1fefa1b0f6034.s
-rwxr--r--    1 qmaill   nofiles      503M 11?? 23 23:59 
@4000000041a3507a1d326f14.s
-rwxr--r--    1 qmaill   nofiles     1007M 11?? 24 10:59 
@4000000041a3eb1f169b21dc.s
-rwxr--r--    1 qmaill   nofiles      1.7M 11?? 24 23:59 
@4000000041a4a1fa2ea56ddc.s
-rwxr--r--    1 qmaill   nofiles      2.0G 11?? 25 11:04 
@4000000041a53db22b10874c.s
-rw-r--r--    1 qmaill   nofiles      1.7M 11?? 25 21:21 current
-rwxr-x---    1 qmaill   root            0 10??  6 13:47 lock
-rwxr-x---    1 qmaill   root            0 10??  6 13:47 state
[root@ns qmail]# ls -lh smtpd/
???? 120M
-rwxr--r--    1 qmaill   nofiles      374K 11?? 18 23:59 
@40000000419cb8fa3243ce34.s
-rwxr--r--    1 qmaill   nofiles      900K 11?? 19 23:36 
@40000000419e0a7a03624794.s
-rwxr--r--    1 qmaill   nofiles      1.8M 11?? 20 23:56 
@40000000419f5bfa2f64ddac.s
-rwxr--r--    1 qmaill   nofiles      3.7M 11?? 21 23:58 
@4000000041a0ad7a2d6d0934.s
-rwxr--r--    1 qmaill   nofiles      7.4M 11?? 22 23:30 
@4000000041a1fefa1c8283ec.s
-rwxr--r--    1 qmaill   nofiles       15M 11?? 23 23:47 
@4000000041a3507a1d368dc4.s
-rwxr--r--    1 qmaill   nofiles       30M 11?? 24 10:58 
@4000000041a3eb1f18dc7e8c.s
-rwxr--r--    1 qmaill   nofiles       90K 11?? 24 23:57 
@4000000041a4a1fa2ffe200c.s
-rwxr--r--    1 qmaill   nofiles       60M 11?? 25 11:03 
@4000000041a53db22b137164.s
-rw-r--r--    1 qmaill   nofiles       78K 11?? 25 21:21 current
-rwxr-x---    1 qmaill   root            0 10??  6 13:47 lock
-rw-r--r--    1 qmaill   nofiles         0 11?? 17 09:07 state


As you can see it is not very consistent.

>and:
>
>  cat -vE <your_multilog_run_scripts>
>  
>
[root@ns supervise]# cat -vE qmail-smtpd/log/run
#!/bin/sh$
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s10000000 \$
/var/log/qmail/smtpd$
[root@ns supervise]# cat -vE qmail-pop3d/log/run
#!/bin/sh$
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s10000000 \$
/var/log/qmail/pop3d$
[root@ns supervise]# cat -vE qmail-send/log/run
#!/bin/sh$
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s10000000 
/var/log/qmail $


>?  And did you change the above multilog run scripts but forget to
>restart the corresponding log services?
>  
>

How do you restart the log services, I am sure I did this but it might 
explain why it is acting kind of wierd, but even if I didn't restart the 
log services it should have defaulted to 99k.  It defaults to n of 10 
just as the daemontools website says.

>- Adrian
>
>
>  
>
Also, is there a way to log less content?

Thanks in advance.

Robert Fisher
Inphase Co., Ltd.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.