1 |
#!/usr/bin/perl -w |
#!/usr/bin/perl -w |
2 |
# File: sap.monitor |
# File: sap.monitor |
3 |
# Author: Dobrica Pavlinusic, dpavlin@rot13.org |
# Author: Dobrica Pavlinusic, dpavlin@rot13.org |
4 |
|
# http://www.rot13.org/~dpavlin/sysadm.html |
5 |
# Description: monitor sap servers using sapinfo from RFCSDK |
# Description: monitor sap servers using sapinfo from RFCSDK |
6 |
# |
# |
7 |
# Usage: sap.monitor [-[hH] ashost only/ignore] [-[sS] sysnr only/ignore] |
# Usage: sap.monitor [-[hH] ashost only/ignore] [-[sS] sysnr only/ignore] |
9 |
# e.g. sap.monitor -s 20 will scan only hosts with sysnr == 20 |
# e.g. sap.monitor -s 20 will scan only hosts with sysnr == 20 |
10 |
# sap.monitor -S 20 will scan only hosts with sysnr != 20 |
# sap.monitor -S 20 will scan only hosts with sysnr != 20 |
11 |
|
|
12 |
|
# configuration file in /usr/local/etc/sap-mon.conf describes which |
13 |
|
# hosts (ashost) and systems (sysnr) you want to check. |
14 |
|
# |
15 |
|
# format of line is: |
16 |
|
# |
17 |
|
# ashost [tab|space] sysnr # optional comment |
18 |
|
# |
19 |
|
# you can spacify host as hostname (sap01) or with sap routers in-between |
20 |
|
# to test routers too (/H/saprtr/H/sap01) |
21 |
|
|
22 |
use strict; |
use strict; |
23 |
use Getopt::Std; |
use Getopt::Std; |
24 |
|
|