SUMMARY: Get syslogd Listening on a UNIX Domain Socket?

From: Crist Clark (crist.clark@globalstar.com)
Date: Thu Jun 19 2003 - 20:42:24 EDT


Duh. It helps if one reads the documentation for the version of Perl that
one is using. Perl 5.8.0 _does_ support a STREAMS device... Kinda.

It doesn't actually work correctly. It just dumps the log
message as a syswrite() (i.e. write(2)) to /dev/conslog. The actual
facility and priority are lost as far as syslogd(1M) understands.
They will end up in the message itself. For example, a
LOG_USER|LOG_DEBUG (0x08|0x07 = 0x0f = 15) message ends up in
/var/adm/messages,

  Jun 19 17:27:04 aurora <15>cclark: test

Despite the fact that /etc/syslog.conf would drop that on the floor. You
can see the facility-priority printed in the leading "<>."

The problem is that Perl doesn't have a STREAMS interface. I could
write one (as Casper Dik pointed out, thanks for the response Casper),
but using an INET socket is starting to look better and better.

Back to the original question, no one offerred any information on how
to convince syslogd(1M) to use old fashioned UNIX domain sockets. I guess
it does not have that capability.

Crist Clark wrote:
>
> I am having some problems with a Perl program using the Sys::Syslog
> module on a Solaris 8 system. I am using Perl 5.8.0, the SMCperl package.
>
> By default, Sys::Syslog tries to use a UNIX domain socket to communicate
> with syslogd. However, the Solaris syslogd doesn't seem to have a UNIX
> domain socket listening anywhere. It has a character device, /dev/log.
>
> I am running syslogd with the '-t' option, so it doesn't listen on 514/udp,
> and I would really like to keep it that way. The Sys::Syslog module only
> knows how to talk to syslogd via a UNIX socket or INET socket.
>
> The specific wording in syslogd(1M),
>
> syslogd reads from the STREAMS log driver, /dev/log, and
> from any transport provider specified in /etc/netconfig,
> /etc/net/transport/hosts, and /etc/net/transport/services.
>
> Makes me wonder if there isn't a way to get syslogd to open up a UNIX
> domain socket with the proper incantations in the named files.
>
> Does anyone know if this can be done? Has anyone done it? Alternatively,
> does anyone have other good workarounds for the Solaris-Sys::Syslog
> incompatibilities? My Googling turned up a lot of complaining about it,
> but few good solutions besides falling back to INET sockets.
> --
> Crist J. Clark crist.clark@globalstar.com
> Globalstar Communications (408) 933-4387
>
> The information contained in this e-mail message is confidential,
> intended only for the use of the individual or entity named above.
> If the reader of this e-mail is not the intended recipient, or the
> employee or agent responsible to deliver it to the intended recipient,
> you are hereby notified that any review, dissemination, distribution or
> copying of this communication is strictly prohibited. If you have
> received this e-mail in error, please contact postmaster@globalstar.com
> _______________________________________________
> sunmanagers mailing list
> sunmanagers@sunmanagers.org
> http://www.sunmanagers.org/mailman/listinfo/sunmanagers

-- 
Crist J. Clark                               crist.clark@globalstar.com
Globalstar Communications                                (408) 933-4387
The information contained in this e-mail message is confidential,
intended only for the use of the individual or entity named above.
If the reader of this e-mail is not the intended recipient, or the
employee or agent responsible to deliver it to the intended recipient,
you are hereby notified that any review, dissemination, distribution or
copying of this communication is strictly prohibited.  If you have
received this e-mail in error, please contact postmaster@globalstar.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:26:37 EDT