Operating System - HP-UX
1751687 Members
5836 Online
108781 Solutions
New Discussion

syslog.log suddenly not updating

 
Bill Hassell
Honored Contributor

Re: syslog.log suddenly not updating

The first question is: is syslogd running when the log stops? If not, some root cronjob has killed the syslogd daemon. This is very common with badly written cron jobs that kill the wrong process ID. Look for kill commands in all cron jobs and remove any that use ps piped to grep. This is a very unstable method and root scripts can do very bad things to your system when wrong process IDs are selected.

The only sane way to find processes by name is to use the -C option, which requires the UNIX95 variable. To find just the process IDs for sh, use this:

UNIX95=1 ps -C sh -o pid=

Compare the output of the above command with the typical grep method:

ps -ef | grep -v grep | grep sh | awk '{print $1}'

which fails miserably by finding unhashdaemon, sshd, ksh, bash, csh, etc, none of which were intended.

Replace all of your kill-by-name scripts with the UNIX95 feature of ps.


Bill Hassell, sysadmin
nightwich
Valued Contributor

Re: syslog.log suddenly not updating

Hi

I have the same problem. So I will summarize waht you need to do to solve the problem.

Note: I am suppose that you don't have any "strang" configuration on your syslog.conf

Check the permissions on the files:

ll /var/run/syslog.pid must be -rw-r--r-- 1 root root

ll /var/adm/syslog/syslog.log must be -rw-r--r-- 1 root root

Check the size of ll /dev/log must be zero if not # > /dev/log

Then restart of the syslog:
# kill -HUP $(cat /var/run/syslog.pid)

Check if the syslog restart
#ps -ef | grep syslog

If this do not solve your problem. You can put the defaults of the O.S.

Do the following:

# mv /etc/syslog.conf /etc/oldsyslog.conf

# cp /usr/newconfig/etc/syslog.conf /etc/syslog.conf

# kill -HUP $(cat /var/run/syslog.pid)

Regards,
Angelo Sousa.