[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[leafnode-list] Logging Stopped; restart syslog needed
I use to get entries in my newslog whenever texpire, fetchnews, and so on did
their activities. However, ever since the logs rotated on 1 July, no entries
were going to my newslog. The last entries, as shown below, were made on July
1 before the rotation. Everything is running as it should except no logging. I
restarted xinetd, but it did not help. I then restarted syslog (service syslog
restart) and news started logging again.
Why does syslog need to be restarted in order for fetchnews, texpire, and so
on to log correctly?
Detailed info on my setup follows:
The /etc/logrotate.conf for news is (logrotate is forced to rotate every month
by an entry in cron.monthly):
# Newslog
/var/log/newslog {
missingok
compress
size 2M
rotate 3
create 0660 root news
}
>From newslog.1.gz:
Jun 30 05:30:16 www texpire[10759]: wrote active file with 53697 lines
Jun 30 05:30:30 www texpire[10759]: 905 articles deleted, 12545 kept
..
Jul 1 03:12:00 www fetchnews[16847]: leafnode 1.9.42.rel: verbosity level is 0
...
Jul 1 03:12:15 www fetchnews[16847]: wrote active file with 53697 lines
Jul 1 03:12:15 www fetchnews[16847]: child has process ID 16848
>From /var/log/cron:
..
Jul 4 09:12:00 www CROND[5334]: (news) CMD (/usr/sbin/fetchnews)
..
Jul 4 10:15:00 www CROND[5719]: (news) CMD (/var/spool/news/chk_leaf_out)
[root@www log]# d newslog*
-rw-rw---- 1 root news 0 Jul 1 03:30 newslog
-rw-rw---- 1 root news 75K Jul 1 03:12 newslog.1.gz
-rw-rw---- 1 root news 52K Jun 1 03:13 newslog.2.gz
-rw-rw-r-- 1 root news 41K May 1 03:12 newslog.3.gz
[root@www news]# rpm -qa | grep leafnode
leafnode-1.9.42.rel-1
[root@www news]# uname -a
Linux www 2.4.20-18.9 #1 Thu May 29 07:08:16 EDT 2003 i686 i686 i386 GNU/Linux
[root@www news]# crontab -u news -l
# fetchnews 8 times a day
12 0-23/3 * * * /usr/sbin/fetchnews
# fetchnews post every 5 minutes
0-59/5 * * * * /var/spool/news/chk_leaf_out
# check for expired articles daily
30 5 * * * /var/spool/news/leafnode.daily.cron
[root@www news]# cat chk_leaf_out
#! /bin/sh
# chk_leaf_out - check for outgoing posts 8 times a day
# Exit if a command yields a non-zero result
set -e
leafnode=`ls -A /var/spool/news/out.going | wc -l`
if [[ $leafnode -gt 0 ]] ; then
/usr/sbin/fetchnews -P
else
exit 0
fi
[root@www news]# cat leafnode.daily.cron
#! /bin/sh
set -e
if [ -f /var/spool/news/leaf.node/groupinfo ] ; then
test -x /usr/sbin/texpire && /usr/sbin/texpire -f
else
exit 0
fi
Entry in /etc/syslog.conf:
# Log news to its own log
news.* /var/log/newslog
--
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list