syslog ignores syslog.conf?

syslog ignores syslog.conf?

Post by Ernst Murnleitne » Thu, 30 May 2002 03:03:35



Dear readers,

On my embedded system (TRM/816 from SSV, Kernel 2.4.10 (Suse 7.3 + based on
the demo of SSV/HJ Walter)) the
/var/log is empty, except that there are two lines logged int /var/log/cron
by the cron.

However, I have changed /etc/syslog.conf to:
# begin of config file
*.*     -/var/log/allmessages
local0,local1.*     -/var/log/localmessages
local2,local3.*     -/var/log/localmessages
local4,local5.*     -/var/log/localmessages
local6,local7.*     -/var/log/localmessages
# end of config file

Why do I not get log files?

Could it have to do something with the fact, that I have the following line
in /etc/inittab (instead of a shell):
1:123:respawn:/mnt/awite/prog

Maybe somebody can help?
Greetings
Ernst

 
 
 

syslog ignores syslog.conf?

Post by Ernst Murnleitne » Thu, 30 May 2002 03:20:36


... root filesystem is on a ramdisk (2 megabytes available, read/write
mounted).

Quote:> Could it have to do something with the fact, that I have the following
line
> in /etc/inittab (instead of a shell):
> 1:123:respawn:/mnt/awite/prog

Same effect with
1:123:respawn:/sbin/getty 115200 ttyS0 vt100

 
 
 

syslog ignores syslog.conf?

Post by Michael Dwye » Thu, 30 May 2002 06:19:03



> However, I have changed /etc/syslog.conf to:
> # begin of config file

          v- You've turn off sync writes
Quote:> *.*     -/var/log/allmessages

      ^- Is this a tab character?

Quote:> Why do I not get log files?

You've turned off sync writes.  Try running the command 'sync' and see
if the logs appear then.  Also, try using 'touch' on the filenames to
create blank ones.  Lastly, the syslog file uses tab (^I) characters
between the fields, not spaces.  

I don't think any of these three are your problem, though.  I'm pretty
sure syslog takes care of the first two automatically.

Quote:> Could it have to do something with the fact, that I have the following line
> in /etc/inittab (instead of a shell):
> 1:123:respawn:/mnt/awite/prog

Well, you should probably start a shell, see is syslogd is actually
running.  If it isn't running, see what happens when you run it manually
-- does it complain about syntax errors in the config file
?

If you only have that one line in your inittab, then nothing is starting
syslogd.  I assume that you only replaced the shell line, though.  Make
sure you still have a 'wait' line that runs some sort of rc.* file...

Good luck!

 
 
 

syslog ignores syslog.conf?

Post by Ernst Murnleitne » Thu, 30 May 2002 22:53:07


Dear Michael,

Thank you for your help:



Quote:> Well, you should probably start a shell, see is syslogd is actually
> running.  If it isn't running, see what happens when you run it manually
> -- does it complain about syntax errors in the config file
> ?

if I start the script, nothing happens.
But if I start /sbin/syslogd, everything works.

So it is a problem in the script, as klogd is not found:
### sysklogd script
#!/bin/sh
test -f /sbin/klogd || exit 0
test -f /sbin/syslogd || exit 0

# Options for start/restart the daemons
#   For remote UDP logging use SYSLOGD="-r"
#
SYSLOGD=""

#  Use KLOGD="-k /boot/System.map-$(uname -r)" to specify System.map
#
KLOGD=""

case "$1" in
  start)
    echo -n "Starting system log daemon: syslogd"
    start-stop-daemon --start  --exec /sbin/syslogd -- $SYSLOGD
    echo -n " klogd"
    start-stop-daemon --start  --exec /sbin/klogd -- $KLOGD
    echo "."
    ;;
  stop)
#some lines removed
# ...

   exit 0

### end sysklogd script

Greetings,
 Ernst

 
 
 

syslog ignores syslog.conf?

Post by Robert Schwebe » Fri, 31 May 2002 01:56:18



> On my embedded system (TRM/816 from SSV, Kernel 2.4.10 (Suse 7.3 + based on
> the demo of SSV/HJ Walter)) the
> /var/log is empty, except that there are two lines logged int /var/log/cron
> by the cron.

Which syslogd are you using? Is it running? Does it find the config
file? Is it able to write?

Robert
--
 +--------------------------------------------------------+
 | Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de |
 | Pengutronix - Linux Solutions for Science and Industry |
 |   Braunschweiger Str. 79,  31134 Hildesheim, Germany   |
 |    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4    |
 +--------------------------------------------------------+

 
 
 

syslog ignores syslog.conf?

Post by Ernst Murnleitne » Wed, 05 Jun 2002 01:41:33




Quote:> Which syslogd are you using?

What do you mean? I used /sbin/syslogd (I think it was on the CD of SSV at
the Kernel 2.4.10 Sample). Maybe I should compile one or take it from the
SuSE 7.3 distribution.

Quote:> Is it running? Does it find the config

It runs if I start it manually but seems not to find the config. It writes
/var/log/messages (instead of allmessages I defined in the config).

Greetings
Ernst

 
 
 

1. Tuning syslog/Syslog reporting/Syslog enhancement/replacements

Hello,

        I have been investigating using syslog's logging facilities. I have
currently set up our network to log to a central logging host. In my
preliminary attempts, I have set up syslog to dump everything to a single file,
which gets messy. I've sorted out the files now, and I have noticed that
certain applications such as telnetd and ftpd write to the LOG_MAIL facility.
Is there
a way to alter the logging facility that they report to, or will I have to have
modified binaries to handle this? I'm mostly concerned with our AIX machines
but we also have HPUX, Sunos/Solaris, and OSF. I could very well have it dump
all
information and sort out the data based on rules I develop using
sed/awk/perl/grep (whatever), But it would be nicer if it were done by
syslog/programs writing to syslog.

        Also, is anyone familiar with any other logging utilities? I would be grateful
for some help/advice or some pointers to where to find this information.

Thanks for your help.

Adam

2. identd help

3. creating different syslog file /var/log/syslog.0 /var/log/syslog.1...

4. rm: removes? Deletes? Reduces hard link count?

5. syslog.conf/syslog

6. Referencing an env var from an env var

7. SYSLOG and syslog.conf

8. sed command

9. Syslog.conf and remote syslog entries

10. Syslog replay script for centralized syslog host

11. Syslog parser wanted to replace Kiwi Syslog (win32)

12. Sending syslog messages to a remote syslog server

13. Syslog question - getting other hosts' syslog messages