ASPL User Manual v 1.00
© 2025 SetSphere.com


12-24

   Monitoring Water Level Between Two Bays: bay12mon.pl

The following script monitor the water level between BAY1 and BAY2. The script shows when the water level is critical.


 -LIS- Listing. 12.24.1   [LISTING bay12mon.pl][ASPL Script bay12mon.pl]
(raw text)
1.     #!/usr/bin/perl
2.     
3.     use strict;
4.     
5.     my $interpreter = "aspl -groupingclass BAYLEVELGROUP -wsname TRANSIENT";
6.     
7.     for (1..17) {
8.     open(ASPL, "| $interpreter -STDIN") or die "ERROR OPENING A PIPE TO aspl: 
      $! \n"; 
9.     print ASPL <<END;
10.    ;;redirecttoemail bassem\@localhost
11.    displayoff
12.    ks mean123 mtime aelm
13.    x = ggbaylevel()
14.    split x into BAY1 BAY2 CRITICAL GOOD WARN
15.    displayon
16.    {fU {f&`ks= CRITICAL BAY1} {f&`ks= CRITICAL BAY2}}
17.    END
18.    close ASPL;
19.    sleep 1;
20.    }

ASPL© 2025 Bassem Jamaleddine


The following figure shows one of the moment when the water level between the two bays is critical.
full view

Image File

 -FG- Fig. 12.24.1   [COMPARING JAR FILES LONG FORMAT]
ASPL © 2025 Bassem Jamaleddine


The complete run of the script is shown in the following terminal.
viewme

 -TC- Display. 12.24.1   [Script bay12mon.pl]
run for bay12mon.pl