1820071 Members
2425 Online
109608 Solutions
New Discussion юеВ

syslogd

 
Chakravarthi
Trusted Contributor

syslogd

hi,

i'm not getting any messages in /var/log/messages,

when i try to restart /etc/rc.d/init.d/syslog

kernel logger is fine, system logger fails,

any thoughts ??

thanks
chakri

6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: syslogd

Start command is:

/sbin/init.d/syslogd start


I'm assuming thats a typo since you say there is partial functionality.

Try this:
/sbin/init.d/syslogd start
rc=$?

echo "process return code: $rc"

If its a zero its a clean start. If not, report the error code.

Also you can put a set -x after the shell command in /sbin/init.d/syslogd and get enhanced diagnostics at startup.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: syslogd

Oops. This is a linux call.

/etc/init.d/syslogd start

servie syslogd start

the set -x stuff is still valid.

SEP
Countdown is 17. Making room on my head for more salad.
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
xyko_1
Esteemed Contributor

Re: syslogd

Hi Chakri,

when you say that kernel log is ok is because you have klogd running and when you say that system logger fails is because you don't have syslogd running ?

If syslogd is running and you don't get any message on /var/log/message you must verify /etc/syslogd.conf to see if there is any mistake on it.
If you are not shure about configure /etc/syslogd.conf please send it to us.

Regards,
Xyko
HGN
Honored Contributor

Re: syslogd

Hi

The syslogd configuration file might have some typo which might need to be fixed. Is syslogd running after you start it.

/etc/init.d/syslog start or restart

If syslogd process is running & if there are no entries in the messages file then you need to check the syslogd.conf file.

Rgds

HGN
Chakravarthi
Trusted Contributor

Re: syslogd

with set -x option i try /etc/rc.d/init.d/syslog start

. /etc/init.d/functions
++ TEXTDOMAIN=initscripts
++ TEXTDOMAINDIR=/etc/locale
++ umask 022
++ export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bi
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -f /etc/sysconfig/i18n -a -z '' ']'
++ . /etc/sysconfig/i18n
+++ SUPPORTED=en_US:en
+++ /sbin/consoletype
++ '[' '' = ja_JP.eucJP -a pty '!=' pty ']'
+++ /sbin/consoletype
++ '[' '' = ko_KR.eucKR -a pty '!=' pty ']'
+++ /sbin/consoletype
++ '[' '' = zh_CN.GB2312 -a pty '!=' pty ']'
+++ /sbin/consoletype
++ '[' '' = zh_TW.Big5 -a pty '!=' pty ']'
++ export LANG
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ RES_COL=60
+++ MOVE_TO_COL=echo -en \033[60G
+++ SETCOLOR_SUCCESS=echo -en \033[1;32m
+++ SETCOLOR_FAILURE=echo -en \033[1;31m
+++ SETCOLOR_WARNING=echo -en \033[1;33m
+++ SETCOLOR_NORMAL=echo -en \033[0;39m
+++ LOGLEVEL=3
+++ PROMPT=yes
++ '[' -x /sbin/consoletype ']'
+++ consoletype
++ '[' pty = serial ']'
++ '[' color '!=' verbose ']'
++ INITLOG_ARGS=-q
+ '[' -f /sbin/syslogd ']'
+ '[' -f /sbin/klogd ']'
+ '[' -f /etc/sysconfig/syslog ']'
+ . /etc/sysconfig/syslog
++ SYSLOGD_OPTIONS=-r -m 0
++ KLOGD_OPTIONS=-2
+ RETVAL=0
+ umask 077
+ start
+ echo -n 'Starting system logger: '
Starting system logger: + daemon syslogd -r -m 0
+ local gotbase=
+ local base= user= nice= bg= pid
+ nicelevel=0
+ '[' syslogd '!=' syslogd ']'
+ '[' -z '' ']'
+ base=syslogd
++ pidfileofproc syslogd
++ local base=syslogd
++ local pid
++ '[' 1 = 0 ']'
++ '[' -f /var/run/syslogd.pid ']'
+ pid=
+ '[' -n '' ']'
+ ulimit -S -c 0
+ '[' color = verbose ']'
+ '[' -z '' ']'
+ initlog -q -c 'syslogd -r -m 0'
+ '[' 2 -eq 0 ']'
+ failure 'syslogd startup'
+ rc=1
+ '[' -z '' ']'
+ initlog -q -n /etc/rc.d/init.d/syslog -s 'syslogd startu
+ '[' color '!=' verbose ']'
+ echo_failure
+ '[' color = color ']'
+ echo -en '\033[60G'
echo -n '['
[+ '[' color = color ']'
+ echo -en '\033[1;31m'
+ echo -n FAILED
FAILED+ '[' color = color ']'
+ echo -en '\033[0;39m'
+ echo -n ']'
]+ echo -ne '\r'
+ return 1
+ return 1
+ RETVAL=1
+ echo



thanks
chakri
Stuart Browne
Honored Contributor

Re: syslogd

'syslogd' fails with error code 2..

It doesn't appear is if it is already running('pidfileofproc syslogd' doesn't find the pid file, and returns 0), so it's just failing in general.

Things to check:

/etc/syslog.conf
/dev/log
/var/run/

You should be trying to start 'syslogd' as the 'root' user (nothing else). The file '/etc/syslog.conf' must exist, and the root user must have read permissions to it. Root must also have read permissions on the socket device '/dev/log' (usually 'srw-rw-rw-'). It must also have write permissions on the '/var/run/' directory to be able to create the pid file.

As 'syslogd' is actually being called by 'initlog', I'd also check that the root user has read permissions on '/etc/initlog.conf'.

Verify all of these, then try it again.
One long-haired git at your service...