Customer is running Solaris with CiscoWorks LMS 3-2 bundle, I see someone else
setup a Perl Script to forward syslog messages to another box, but they are
getting a second message that's blank we each forwarded message and want to
know how to get rid of the blank messages. If you know Perl do you see
anything wrong?
cworks$more syslog_forward.sh
#!/bin/sh
/usr/bin/date
>>
/var/adm/CSCOpx/files/scripts/syslog/sysl_fwd.log
/usr/bin/echo "$2" >>
/var/adm/CSCOpx/files/scripts/syslog/sysl_fwd.log
/opt/CSCOpx/bin/perl
/var/adm/CSCOpx/files/scripts/syslog/syslog_forward.pl "$2"
cworks$
cworks$more syslog_forward.pl
#!/opt/CSCOpx/bin/perl
use strict;
use
Sys::Syslog qw(:DEFAULT setlogsock);
my $msg = $ARGV[0];
setlogsock('inet');
$Sys::Syslog::host = '10.10.10.100';
syslog('info|local7', $msg);
closelog;
cworks$
-----------------------------------------
Disclaimer:
This e-mail
communication and any attachments may contain
confidential and privileged
information and is for use by the
designated addressee(s) named above only.
If you are not the
intended addressee, you are hereby notified that you have
received
this communication in error and that any use or reproduction of
this
email or its contents is strictly prohibited and may be
unlawful. If you have
received this communication in error, please
notify us immediately by replying
to this message and deleting it
from your computer. Thank you.
Blogs and organic groups at http://www.ccie.net
Received on Fri Jan 14 2011 - 15:38:54 ART
This archive was generated by hypermail 2.2.0 : Tue Feb 01 2011 - 07:39:17 ART