#########################################################################################
# This little PERL script runs on a web server that can reach the SAP
# systems on the lan. When called, it checks the status of an SAP system
# and lets us know, whether it is up or down. Sapinfo.exe has to be
# copied to cgi-bin. This particular script runs on NT with IIS.
# Change the first two lines to the location of your Perl to run it on UNIX.
# It be called using the following html tags:
#
#
#
# And it will look like this:
#########################################################################################
#
print "HTTP/1.0 200 OK\n";
print "Content-type: text/html\n\n";
#
print "";
#
require "cgi-lib.pl";
&ReadParse;
$i = 0;
$b = $in{'SYS'};
#
if ($b =~ /RTC/) {
open (FILE, "sapinfo -3 -h saphost1 -s 00 -u sap* -p passwd1 |");
}
else {
open (FILE, "sapinfo -3 -h saphost2 -s 99 -u sap* -p passwd2 |");
}
#
while ($a =
if ($i == 0) {
print "When you clicked on the button $b was up and running!
";
}
print "$a
";
$i+=1;
}
print "";
if ($i == 0) {
print "When you clicked on the button $b was down!";
}
print "";
#
#########################################################################################
No comments:
Post a Comment