Operating System - HP-UX
1836861 Members
2213 Online
110110 Solutions
New Discussion

Re: syslogd is not logging

 
Mike Kuhar
Advisor

syslogd is not logging

I've been rather stumped by this. /etc/syslog.conf does not contain spaces as white space. However, I noticed that this in /dev:

prw-rw-rw- 1 root root 8192 Aug 29 05:38 /dev/log

This doesn't look like a valid device file. Further, the timestamp on the file coincides with the time and date syslogd stopped working.
I'm running HP-IX 10.20. What would be the correct command for recreating a valid /dev/log entry?
13 REPLIES 13
Robert-Jan Goossens
Honored Contributor

Re: syslogd is not logging

Hi Mike,

the /dev/log is a named pipe for the syslogd.

(10.20)
clear the /dev/log file

# > /dev/log
check if the /dev/klog file is correct.
# ll /dev/klog crw------- 1 bin bin 189 0x000000 Jun 26 2001 /dev/klog

Restart the syslogd.

Regards,
Robert-Jan
Mike Kuhar
Advisor

Re: syslogd is not logging

Maybe I was in error. Doing a file /dev/log shows me that this is a fifo. So that seems correct. But I still have the problem that syslogd is not logging. Further, issuing a HUP to syslogd or issuing logger "test" creates no entries in /var/adm/syslog/syslog.log.
Marco A.
Esteemed Contributor

Re: syslogd is not logging

Hello,


You need to returns this file to "zero" by sending a null value to it.

#> /dev/log

If the file reaches again the 8192 you will get the issue again, please check the console, probably your console is set to CM mode, if you want to correct the issue return the console mode to CO.

Hope this helps,

Regards,


Marco
Just unplug and plug in again ....
Mike Kuhar
Advisor

Re: syslogd is not logging

Commands performed:

root@hpas40:/dev > cat /dev/null > /dev/log
root@hpas40:/dev > ls -la log
prw-rw-rw- 1 root root 2048 Sep 3 04:53 log
root@hpas40:/dev > > log
root@hpas40:/dev > ls -la log
prw-rw-rw- 1 root root 2048 Sep 3 04:53 log

As you can see, no luck.

BTW:
root@hpas40:/dev > ls -la klog
crw------- 1 bin bin 189 0x000000 Oct 5 1999 klog
Marco A.
Esteemed Contributor

Re: syslogd is not logging

Check the console mode !!! ...
This issue is related with it.


Regards,


Marco
Just unplug and plug in again ....
AwadheshPandey
Honored Contributor

Re: syslogd is not logging

http://www.docs.hp.com/en/T1471-90023/ch01s05.html
It's kind of fun to do the impossible
Robert-Jan Goossens
Honored Contributor

Re: syslogd is not logging

Mike,

try to stop the syslogd first.

# /sbin/init.d/syslogd stop
# > /dev/log
# ll /dev/log
# /sbin/init.d/syslogd start
# tail -f /var/adm/syslog/syslog.log

Robert-Jan
Mike Kuhar
Advisor

Re: syslogd is not logging

1. How do I check console mode? I'm in Ohio and the server is in california?

2. Not sure what ssh has to to with the issue.
Mike Kuhar
Advisor

Re: syslogd is not logging

Interesting. syslogd is stopped, but:

root@hpas40:/sbin/init.d > > dev/log
sh[2]: dev/log: Cannot create the specified file.
Marco A.
Esteemed Contributor

Re: syslogd is not logging

Hello Mike,

Check the console keyboard. If using a dump terminal, such as a 700/96 etc.. ensure that 'remote mode' (F4) has an * -- ie. on.

If need be, reset the console, by holding down the d key while powering on.

If using remote console, then make sure it's not in some mode like CM>. Change it so CO(console mode).


The procedure to change the console is :
http://www.pimpworks.org/hp/hpuxtips.html#10


Let us know your results,

Regards,

Marco
Just unplug and plug in again ....
Mike Kuhar
Advisor

Re: syslogd is not logging

Read above. I'm in Ohio and the server is in California. No direct access to the console terminal.
Marco A.
Esteemed Contributor

Re: syslogd is not logging

That's correct , but that's the way to change the console mode.

Marco
Just unplug and plug in again ....
Mike Kuhar
Advisor

Re: syslogd is not logging

It appears to be working again. I rm'd /var/adm/syslog/syslog.log. I then then touch /var/adm/syslog/syslog.log which recreated the file, and then restarted syslogd. syslogd was now working. syslog.log was 0 bytes large, so I don't see where it could have been corrupt, but I guess anything is possible. However, the group is now sys, instead of root. So I'm a happy camper. Thanks for all your help.