No logging in Solaris 9 (with workaround) - question?
Randy Fishel
randyf at sibernet.com
Wed Sep 13 06:11:37 IST 2006
On Sep 12, 2006, at 12:38 AM, Julian Field wrote:
>
> René Berber wrote:
>> René Berber wrote:
>> [snip]
>>
>>> eval {
>>> # if ($^O !~ /solaris|sunos|irix/i) {
>>> Sys::Syslog::setlogsock('udp');
>>> # } # else {
>>>
>> [snip]
>>
>> My mistake, even if it works as shown above I should have changed
>> it like this (I'm not sure about Irix or SunOS so it may still be
>> wrong):
>>
>> eval {
>> if ($^O !~ /solaris|sunos|irix/i) {
>> Sys::Syslog::setlogsock('unix');
>> } else {
>> Sys::Syslog::setlogsock('udp');
>> }
>> }
>>
> Can other Solaris users comment on this please?
>
As Solaris implements Syslog as a network service, it _should_ use
some form of a network
socket. A 'unix' domain socket implies the open of /dev/log or /dev/
conslog (which may not generate the desired results, especially if
the syslog device is a remote machine).
However, though using 'udp' might work, I prefer to use 'inet', as
it will implement the connection over the protocol that is actually
being used (tcp or udp). So my suggestion would be to make this
'Sys::Syslog::setlogsock('inet');' (and what all my syslog perl
scripts do without problems from Solaris 2.5.1 to OpenSolaris).
rf
More information about the MailScanner
mailing list