ASPL Manual v 1.00
© 2024 by SetSphere.COM
12-21
The following script monitor the water level between BAY1 and BAY2. The script shows when the water level is critical.
[Top 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. }
The following figure shows the result when comparing system PATH between hosts mm01 and vienna.
This example is shown in the following terminal.
display or terminal for Example: Script bay12mon.pl