[NTLUG:Discuss] /dev/log?

Rusty Haddock rusty at fe2o3.lonestar.org
Thu Jun 22 11:19:52 CDT 2000


Richard Cobbe wrote:
    >Greetings, all.

Howdy.

    >Just had a brief power failure here.  My system appears to be fine after a
    >reboot and an fsck, but there are a couple of things I'm unclear on.
    >
    >When I first booted after the power was restored, the system ran fsck and
    >emitted a couple of error messages saying something on the order of
    >"setting file type of /dev/log to 6", and one of the same for /dev/printer.
    >
    >So, my questions:
    >
    >1) What's /dev/log used for?  /usr/src/linux/Documentation/devices.txt
    >   claims it's the "syslog local socket", but that's not entirely
    >   informative.

The Unix domain socket from where local syslog messages are read.  Syslogd
is the program that is the recorder of system messages, whether
informative or about an error condition.  The syslog daemon "listens" to
this socket and UDP port 514 and writes the messages to the syslog, which
gets written locally into /var/log/messages.  The TCP/IP port is intended
other systems on the net to log their error/information messages so they
can be collected in one place.  That's the basics.

    >2) What's it supposed to be?  ls -l /dev/log returns
    >    srw-rw-rw-    1 root     root            0 Jun 21 18:21 /dev/log
    >
    >   Is that right?  It's obviously a socket, but are permissions and
    >   ownership OK?

Yes.

    >3) What does "setting filetype to 6" accomplish?

I have no idear.  I've not heard of this before.  I don't have the
sources loaded so I can't go look at fsck to find out.

    >4) On RH, /dev/log is part of the dev package.  I ran an rpm -V dev, and it
    >   appears to think that /dev/log is OK, minus an MD5 sum error, which I'm
    >   guessing isn't a problem.

Nope, shouldn't be.  Tis a little hard to run 'md5sum' on a socket.

    >   However, I also got the message about /dev/printer, which doesn't appear
    >   to be owned by any RPMs.  What's this?  devices.txt says "lpd local
    >   socket", which is as informative as the other one.

How 'bout trying the man page for lpd(8) since devices.txt doesn't contain
the world's knowledge about devices and sockets??  This socket is, again,
a Unix domain socket that is used to make local requests of the line
printer daemon (lpd).  This keeps lpr from having to open a TCP/IP
connection to the local machine. 

    >
    >   Oh, and:
    >
    >    srw-------    1 root     root            0 Jun 21 18:21 /dev/printer
    >
    >If it matters, I'm running RH6.2, with kernel 2.2.16.  /dev is, as you
    >probably figured, on an ext2 fs.

This is fine too.  You only want one program to talk to that port and
that'll be 'lpr(1)' or equivalent.  Note that /usr/bin/lpr is suid and
sgid to root, at least on my RH5.2 box. 

Both of these sockets are sorta "behind the curtain" tools used by a
running Unix/Linux system and have been there since antiquity.  "Pay no
attention to the man behind the curtain"...  unless, of course, he's
missing.  :-)

	-Rusty-
-- 
   _____        Rusty Haddock  =  KD4WLZ  =  rusty at fe2o3.lonestar.org
|\/   o \   o
|   (  -<  O o  Thanks, Sparky!          Charles M Schulz (1922-2000)
|/\__V__/




More information about the Discuss mailing list