[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Sys::Syslog stuff
------- Forwarded Message
From: Jeffrey Friedl <jfriedl@yahoo-inc.com>
Message-Id: <200001180717.XAA10125@ventrue.yahoo.com>
To: tchrist@perl.com
In-reply-to: <10374.948150923@chthon> (message from Tom Christiansen on Mon, 17 Jan 2000 16:15:23 -0700)
Subject: Re: syslog mail
Tom Christiansen <tchrist@chthon.perl.com> wrote:
|> Could you please on the mail we exchanched about Sys::Syslog to p5p?
I take it the word 'pass' should be found in there somewhere? :-)
Rather than make a fool of myself again (since I don't really know anything
about syslog stuff), I'll just forward your last reply back to you and let
you pick and choose what you want to pass along further.
Thanks,
Jeffrey
|>
|> >Some friends here are asking me about Sys::Syslog (which the comments say
|> >you last maintained). Apparently, unlike syslog(3) under Unix, the syslog()
|> >that Sys::Syslog provides defaults to inet sockets (the default for
|> >syslog(3) is inet).
|>
|> Don't you mean that Sys::Syslog defaults to SOCK_INET sockets, but that
|> syslog(3) defaults to SOCK_UNIX sockets? I've noticed this problem,
|> too, especially with newer flavors of syslogd(8). For example, on
|> Redhat/Linux, you need to call syslogd with a -h option to get it
|> to listen to forwarded messages from off-machine, and the -r option
|> to pay attention to internet sockets at all:
|>
|> -r This option will enable the facility to receive
|> message from the network using an internet domain
|> socket with the syslog service (see services(5)).
|> The default is to not receive any messages from the
|> network.
|>
|> This option is introduced in version 1.3 of the
|> sysklogd package. Please note that the default
|> behavior is the opposite of how older versions
|> behave, so you might have to turn this on.
|>
|> This one definitely caught me napping. My messages weren't happening.
|> If Perl had been defaulting to SOCK_UNIX, this wouldn't have been
|> a problem. As it was, I noticed there was a problem because I wasn't
|> getting stuff, and eventually tracked it down.
|>
|> I see that a setlogsock() function has been added to Sys::Syslog.
|> It's nice to be able to choose, but perhaps the default is non-optimal.
|>
|> I find the syslog(3) and syslogd(8) differences to be much greater
|> than one would expect.
|>
|> Here's the syslogd(8) usage string on Redhat/Linux:
|>
|> syslogd [ -a socket ] [ -d ] [ -f config file ] [ -h ] [ -l hostlist ]
|> [ -m interval ] [ -n ] [ -p socket ] [ -r ] [ -s domainlist ]
|> [ -v ]
|>
|> Here's the syslogd(8) usage string on OpenBSD:
|>
|> syslogd [-du] [-f config_file] [-m mark_interval] [-a path]
|> [-p log_socket]
|>
|> Here's the syslogd(8) usage string on Solaris:
|>
|> syslogd [ -d ] [ -f configfile ] [ -m markinterval ] [ -p path ]
|>
|> I also notice that while openlog(3) these days accepts LOG_PERROR,
|> that the Perl equivalent does not. It's also annoying that the
|> running make install puts the module in place, but it's still not
|> usable as is. Watch:
|>
|> redhat-old% perl -MSys::Syslog -e 1
|> Can't locate stdarg.ph in @INC (did you run h2ph?) (@INC contains: ...
|>
|> redhat-new% perl -MSys::Syslog -e 1
|> Can't locate syslog.ph in @INC (did you run h2ph?) (@INC contains:...
|>
|> Only OpenBSD seems to come with syslog working by default. Their
|> @INC (at least in their 2.6 release) is:
|>
|> @INC:
|> /usr/libdata/perl5/i386-openbsd/5.00503
|> /usr/local/libdata/perl5/i386-openbsd/5.00503
|> /usr/libdata/perl5
|> /usr/local/libdata/perl5
|> /usr/local/libdata/perl5/site_perl/i386-openbsd
|> /usr/libdata/perl5/site_perl/i386-openbsd
|> /usr/local/libdata/perl5/site_perl
|> /usr/libdata/perl5/site_perl
|> .
|>
|> Which it found here:
|>
|> openbsd% perl -le '$f="sys/syslog.ph"; require $f; print $INC{$f}'
|> /usr/libdata/perl5/site_perl/i386-openbsd/sys/syslog.ph
|>
|> Remarkable.
|>
|> And people wonder why some of us prefer BSD over Linux: it's
|> because the people making the distributions dot their i's and
|> cross the t's on BSD. And the Linux vendors don't. Sigh.
|>
|> >Is this an oversight, or by design? If the former, is it something
|> >that can be changed?
|>
|> I doubt whether it's by design. All else is negotiable.
|>
|> --tom
my reply, then....
|> |> Don't you mean that Sys::Syslog defaults to SOCK_INET sockets, but that
|> |> syslog(3) defaults to SOCK_UNIX sockets?
|>
|> Yes, I think that's what I was asking :-)
|>
|> |> And people wonder why some of us prefer BSD over Linux: it's
|> |> because the people making the distributions dot their i's and
|> |> cross the t's on BSD. And the Linux vendors don't. Sigh.
|>
|> From what I've heard, BSD is both an OS *and* a distribution, and so it's
|> kept cleaner. (Yahoo uses BSD). You've got to admit, though, that the /proc
|> filesystem under Linux is very nice.
|>
|> |> >Is this an oversight, or by design? If the former, is it something
|> |> >that can be changed?
|> |>
|> |> I doubt whether it's by design. All else is negotiable.
|>
|> Mostly I was just passing along a comment by our admins here. Not knowing
|> how Syslog is most commonly used, I don't know if it'd be a big deal to
|> change that default to match the normal BSD semantics or not. Of course,
|> they can change their own copy, but I'm sure they'd rather keep the
|> standard distribution standard.
|>
|> I suppose they can always install a modified copy of Syslog.pm somewhere
|> earlier in the include path, but again, they're not being portable.
|>
|> All that being the case, do you think the distributed version will or won't
|> change? (with the default being "won't" unless a lot of planets align just
|> right, I know :-)
|> Jeffrey
------- End of Forwarded Message
- Follow-Ups from:
-
Andy Dougherty <doughera@lafayette.edu>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]