Skip Menu |
 

This queue is for tickets about the Sys-Syslog CPAN distribution.

Report information
The Basics
Id: 17723
Status: resolved
Priority: 0/
Queue: Sys-Syslog

People
Owner: SAPER [...] cpan.org
Requestors: tiamat [...] komi.mts.ru
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.13
Fixed in: 0.25



Subject: setlogsock('stream') not work under Solaris
Download (untitled) / with headers
text/plain 3.1k
Hi, I have trouble using the Sys::Syslog package under Solaris. If use 'stream', i don't get anything logged: #!/usr/local/bin/perl use strict; use Sys::Syslog qw(:DEFAULT setlogsock); setlogsock('stream'); openlog("perl", "pid", "local2"); syslog("debug", "test stream"); closelog; But if use udp it works fine: #!/usr/local/bin/perl use strict; use Sys::Syslog qw(:DEFAULT setlogsock); setlogsock('udp'); openlog("perl", "pid", "local2"); syslog("debug", "test udp"); closelog; Feb 18 10:56:24 localhost perl[375]: test udp How to get stream at work? My system: Solaris 9 (SunOS samba 5.9 Generic_118558-11 sun4u sparc SUNW,Sun-Fire-V210) Perl 5.8.8: $ perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=solaris, osvers=2.9, archname=sun4-solaris-64 uname='sunos samba 5.9 generic_118558-11 sun4u sparc sunw,sun-fire-v210 ' config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl/sun4u -Dprivlib=/usr/local/lib/perl -Dsitearch=/usr/local/lib/perl/site/sun4u -Dsitelib=/usr/local/lib/perl/site -Ui_iconv -Uinstallusrbinperl -Dcc=gcc -Doptimize=-D_REENTRANT -O2 -pipe -Duseshrplib -Ud_dosuid -Ui_gdbm -Dusethreads=n -Dusemymalloc=y -Dlocincpth=/usr/local/include -Dloclibpth=/usr/local/lib -Dcf_email=tiamat@komi.mts.ru -Dcf_by=Alex Deiter' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=y, bincompat5005=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-D_REENTRANT -O2 -pipe', cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include' ccversion='', gccversion='4.0.2', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib -m64 ' libpth=/usr/local/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldb -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R /usr/local/lib/perl/sun4u/CORE' cccdlflags='-fPIC', lddlflags=' -G -m64 -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MYMALLOC PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO Built under solaris Compiled at Feb 13 2006 18:55:06 %ENV: PERL5LIB="/export/home/devel/tmp/lib/usr/local/lib" @INC: /export/home/devel/tmp/lib/usr/local/lib /usr/local/lib/perl/sun4u /usr/local/lib/perl /usr/local/lib/perl/site/sun4u /usr/local/lib/perl/site /usr/local/lib/perl/site Thanks a lot!
Subject: Re: [rt.cpan.org #17723] setlogsock('stream') not work under Solaris
Date: Mon, 20 Feb 2006 01:29:24 +0100
To: bug-Sys-Syslog [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Download (untitled) / with headers
text/plain 503b
Show quoted text
> I have trouble using the Sys::Syslog package under Solaris. > If use 'stream', i don't get anything logged:
Can you tell me whether it previously worked with a previous version of Perl and/or Sys::Syslog or are you using it for the first time ? Also, can you confirm me that you're using Sys::Syslog 0.13 ? If it's the case, it should be written in the documentation. Sébastien Aperghis-Tramoni -- - --- -- - -- - --- -- - --- -- - --[ http://maddingue.org ] Close the world, txEn eht nepO
Download (untitled) / with headers
text/plain 277b
Have you checked you have configures syslogd correctly? Your example code works perfectly for me: writemsg(8): Logging msg '<151>Feb 21 18:57:19 perl[5322]: test stream' to FILE /tmp/syslog $ cat /tmp/syslog Feb 21 18:57:19 rif <151>Feb 21 18:57:19 perl[5322]: test stream
Subject: Re: [rt.cpan.org #17723] setlogsock('stream') not work under Solaris
Date: Wed, 22 Feb 2006 09:52:22 +0300
To: bug-Sys-Syslog [...] rt.cpan.org
From: Дейтер Александр Валериевич <tiamat [...] komi.mts.ru>
Download (untitled) / with headers
text/plain 4.7k
Alan_Burlison via RT wrote: Show quoted text
> Have you checked you have configures syslogd correctly?
Yes of course: my syslog.conf: *.err;kern.notice;auth.notice /dev/sysmsg *.err;kern.debug;daemon.notice;mail.crit /var/adm/messages local2.debug /var/adm/messages auth.debug /var/adm/messages daemon.debug /var/adm/messages *.alert;kern.err;daemon.err operator *.alert root *.emerg * user.err /var/adm/messages # /usr/sbin/syslogd -d main(1): Started at time Wed Feb 22 08:31:00 2006 hnc_init(1): hostname cache configured 128 entry ttl:600 getnets(1): found 1 addresses, they are: 0.0.0.0.2.2 amiloghost(1): testing 127.0.0.1.2.2 conf_init(1): I am loghost cfline(1): (*.err;kern.notice;auth.notice /dev/sysmsg) cfline(1): (*.err;kern.debug;daemon.notice;mail.crit /var/adm/messages) cfline(1): (local2.debug /var/log/snmp) cfline(1): (auth.debug /var/adm/messages) cfline(1): (daemon.debug /var/adm/messages) cfline(1): (*.alert;kern.err;daemon.err operator) cfline(1): (*.alert root) cfline(1): (*.emerg *) cfline(1): (user.err /var/adm/messages) syslogd: version 1.99 Started: Wed Feb 22 08:31:00 2006 Input message count: system 0, network 0 # Outputs: 9 ------------------------ priority = [file, facility] ------------------------ 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 -------------------------------------------------- 5 3 3 3 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 X CONSOLE: /dev/sysmsg 7 3 2 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 X FILE: /var/adm/messages X X X X X X X X X X X X X X X X X X 7 X X X X X X FILE: /var/log/snmp X X X X 7 X X X X X X X X X X X X X X X X X X X X FILE: /var/adm/messages X X X 7 X X X X X X X X X X X X X X X X X X X X X FILE: /var/adm/messages 3 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X USERS: operator 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X USERS: root 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 X WALL: X 3 X X X X X X X X X X X X X X X X X X X X X X X FILE: /var/adm/messages Facilities: [00] kern: 0 [01] user: 8 [02] mail: 16 [03] daemon: 24 [04] auth: 32 [05] security: 32 [06] mark: 192 [07] syslog: 40 [08] lpr: 48 [09] news: 56 [10] uucp: 64 [11] cron: 120 [12] local0: 128 [13] local1: 136 [14] local2: 144 [15] local3: 152 [16] local4: 160 [17] local5: 168 [18] local6: 176 [19] local7: 184 Priorities: [00] panic: 0 [01] emerg: 0 [02] alert: 1 [03] crit: 2 [04] err: 3 [05] error: 3 [06] warn: 4 [07] warning: 4 [08] notice: 5 [09] info: 6 [10] debug: 7 [11] none: 16 Per File Statistics File Tot Dups Nofwd Errs ---- --- ---- ----- ---- /dev/sysmsg 0 0 0 0 /var/adm/messages 0 0 0 0 /var/log/snmp 0 0 0 0 /var/adm/messages 0 0 0 0 /var/adm/messages 0 0 0 0 operator 0 0 0 0 root 0 0 0 0 WALL 0 0 0 0 /var/adm/messages 0 0 0 0 logmsg(11): msg dispatcher started sys_poll(12): sys_thread started init(1): accepting messages from local system set_udp_buffer(1): allocate 262144 for fd 3 init(1): accepting messages from remote net_poll(15): net_thread started hostname_lookup(14): hostname_lookup started init(1): syslogd: started main(1): off & running.... and nothing at start of a test script. But 'logger -p err test' show me: writemsg(2): Logging msg 'Feb 22 09:45:33 root: [ID 702911 user.error] test' to CONSOLE /dev/sysmsg writemsg(3): Logging msg 'Feb 22 09:45:33 root: [ID 702911 user.error] test' to FILE /var/adm/messages writemsg(10): Logging msg 'Feb 22 09:45:33 root: [ID 702911 user.error] test' to FILE /var/adm/messages Show quoted text
>Your example > code works perfectly for me: > > writemsg(8): Logging msg '<151>Feb 21 18:57:19 perl[5322]: test stream' > to FILE /tmp/syslog > > $ cat /tmp/syslog > Feb 21 18:57:19 rif <151>Feb 21 18:57:19 perl[5322]: test stream
What your environment? I try two perl build: 64-bit perl with gcc compiler 32-bit perl with sun studio compiler What to me still to try? Thanks a lot! -- Alex Deiter
Subject: Re: [rt.cpan.org #17723] setlogsock('stream') not work under Solaris
Date: Fri, 4 Jan 2008 16:28:38 +0100
To: bug-Sys-Syslog [...] rt.cpan.org, Дейтер Александр Валериевич <tiamat [...] komi.mts.ru>
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Download (untitled) / with headers
text/plain 593b
Hello, Getting back to you regarding this problem with Sys::Syslog: Show quoted text
> I have trouble using the Sys::Syslog package under Solaris. > If use 'stream', i don't get anything logged:
Did you try to upgrade Sys::Syslog to a more recent version? Since 0.15, there's support for the native Unix mechanism which should avoid the problems you had. And I advise you to avoid using setlogsock () because Sys::Syslog now uses what should be the best mechanism for your system. Don't hesitate to ask if you have any question. Show quoted text
>
-- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
Subject: Re: [rt.cpan.org #17723] setlogsock('stream') not work under Solaris
Date: Sun, 8 Jun 2008 03:32:01 +0200
To: bug-Sys-Syslog [...] rt.cpan.org, Дейтер Александр Валериевич <tiamat [...] komi.mts.ru>
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Download (untitled) / with headers
text/plain 236b
Hello, As far as I can tell, this issue should be resolved with version 0.25. Don't hesitate to reopen the ticket if you encounter a problem. Thanks for your report. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.