[prev in list] [next in list] [prev in thread] [next in thread]
List: swatch-users
Subject: Swatch-users Digest, Vol 11, Issue 5
From: swatch-users-request () ucsb ! edu
Date: 2003-03-21 20:00:27
[Download RAW message or body]
Send Swatch-users mailing list submissions to
swatch-users@ucsb.edu
To subscribe or unsubscribe via the World Wide Web, visit
http://ucsb.edu/mailman/listinfo/swatch-users
or, via email, send a message with subject or body 'help' to
swatch-users-request@ucsb.edu
You can reach the person managing the list at
swatch-users-owner@ucsb.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Swatch-users digest..."
Today's Topics:
1. Re: Re: exec in swatch 3.0.5 (Todd Atkins)
2. reporting almost everything (Vijay Avarachen)
3. Swatch 3.0.7 Released (E. Todd Atkins)
----------------------------------------------------------------------
Message: 1
Date: Thu, 20 Mar 2003 15:20:41 -0800
From: Todd Atkins <Todd.Atkins@UCSB.EDU>
Subject: Re: [Swatch-users] Re: exec in swatch 3.0.5
To: Sylvain <sa@nctech.fr>, swatch-users@ucsb.edu
Message-ID: <109372148.1048173641@[192.168.1.100]>
Content-Type: text/plain; charset=iso-8859-1; format=flowed
This is really a bug which I have fixed in version 3.0.7 which will be
released tomorrow.
--On Thursday, March 20, 2003 11:13 AM +0100 Sylvain <sa@nctech.fr> wrote:
>
> Aprés plusieurs essai, avec les version 3.0.4, 3.0.5 et 3.0.6 de
> swatch. La commande 'exec echo $0', ne fonctionne pas avec les deux
> dernières. Alors qu'elle fonctionnait avec la version 3.0.4 de swatch.
>
> Suite à l'analyze des dumps, j'ai remarquer la différence suivante :
>
> *** dump-3.0.4 Thu Mar 20 11:06:11 2003
> --- dump-3.0.6 Thu Mar 20 11:07:06 2003
> ***************
> *** 461,478 ****
> my $Filename = 'kern.log';
> my $Fh = new FileHandle "$Filename", 'r';
> if (not defined $Fh) {
> ! die "../Sources/swatch-3.0.4/blib/script/swatch: cannot read input
> \"$Filename\": $!\n"; }
>
> LOOP: while (<$Fh>) {
>
> chomp;
> ! my $sanitized_ = $_;
> @_ = split;
>
> # quote all special shell chars
> ! $sanitized_ =~ s/([;&\(\)\|\^><\$`'\\])/\\$1/g;
> ! my @sanitized_ = split(/\s+/, $sanitized_);
> if (/file system full/) {
> exec_command('COMMAND' => "echo $sanitized_", );
> next;
> --- 480,498 ----
> my $Filename = 'kern.log';
> my $Fh = new FileHandle "$Filename", 'r';
> if (not defined $Fh) {
> ! die "../Sources/swatch-3.0.6/swatch: cannot read input
> \"$Filename\": $!\n"; }
>
> LOOP: while (<$Fh>) {
>
> chomp;
> ! my $S_ = $_;
> @_ = split;
>
> # quote all special shell chars
> ! $S_ =~ s/([;&\(\)\|\^><\$`'\\])/\\$1/g;
> ! my @S_ = split(/\s+/, $S_);
> !
> if (/file system full/) {
> exec_command('COMMAND' => "echo $sanitized_", );
> next;
>
>
> Il me semble donc que dans le script généré, par swatch 3.0.6. Il y a
> un problème au niveau de la commande echo, qui n'utilise pas la bonne
> variable ($sanitized_ à la place de $S_)
>
> La modif suivante dans le script swatch, a pallier au problème. Mais
> je ne suis pas sure que cela soit trés propre ?
>
> *** swatch Tue Mar 18 19:28:58 2003
> --- swatch.new Thu Mar 20 11:01:03 2003
> ***************
> *** 1261,1267 ****
> if ($key =~ /pipe/) {
> $options{'MESSAGE'} = '$_';
> }
> ! $options{'COMMAND'} = convert_command('sanitized_',
> $options{'COMMAND'}); } elsif ($key =~ /(mail|write|echo)/) {
> $options{'MESSAGE'} = '$_';
> }
> --- 1261,1267 ----
> if ($key =~ /pipe/) {
> $options{'MESSAGE'} = '$_';
> }
> ! $options{'COMMAND'} = convert_command('S_', $options{'COMMAND'});
> } elsif ($key =~ /(mail|write|echo)/) {
> $options{'MESSAGE'} = '$_';
> }
>
>
>
> Sylvain...
>
>
>
>
> _______________________________________________
> Swatch-users mailing list
> Swatch-users@ucsb.edu
> http://ucsb.edu/mailman/listinfo/swatch-users
------------------------------
Message: 2
Date: Fri, 21 Mar 2003 10:27:36 -0600
From: Vijay Avarachen <stalione@avarachen.net>
Subject: [Swatch-users] reporting almost everything
To: swatch-users@ucsb.edu
Message-ID: <3E7B3D78.3060102@avarachen.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Hi,
I am using swatch with syslog-ng and so far its working great. One of
the Windoze admins wants me to set up the swatch so that it ignore some
things and reports everything else. I know how to ignore things, but I
am not sure how to send out everythign else in one email. I guess he
wants things to be mailed to him in batches rather than one email for
every little event. Can some one help please.
Vijay Avarachen
------------------------------
Message: 3
Date: Fri, 21 Mar 2003 09:39:48 -0800
From: "E. Todd Atkins" <todd.atkins@stanfordalumni.org>
Subject: [Swatch-users] Swatch 3.0.7 Released
To: swatch-announce@ucsb.edu, swatch-users@ucsb.edu
Message-ID: <38914636.1048239588@abc.oit.ucsb.edu>
Content-Type: text/plain; charset=us-ascii; format=flowed
Swatch 3.0.7 has now been released and can be downloaded from
http://prdownloads.sourceforge.net/swatch/swatch-3.0.7.tar.gz?download
Since swatch is now a sourceforge.net project its homepage is
http://swatch.sourceforge.net. Use the following links for reporting bugs,
requesting features, etc.:
Please report bugs at
http://sourceforge.net/tracker/?atid=521868&group_id=68627&func=browse
Please request features at
http://sourceforge.net/tracker/?atid=521871&group_id=68627&func=browse
Please submit patches at
http://sourceforge.net/tracker/?atid=521871&group_id=68627&func=browse
Please request support at
http://sourceforge.net/tracker/?atid=521869&group_id=68627&func=browse
Also, the swatch-announce and swatch-users mailing lists will remain at
ucsb.edu until I can find the time to migrate them to sourceforge.net.
Todd Atkins
Todd.Atkins@StanfordAlumni.org
http://www.stanford.edu/~atkins
------------------------------
_______________________________________________
Swatch-users mailing list
Swatch-users@ucsb.edu
http://ucsb.edu/mailman/listinfo/swatch-users
End of Swatch-users Digest, Vol 11, Issue 5
*******************************************
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic