1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/perl # Oracle plugin submitted by Christopher Maser (maser@onvista.de) # 12/31/1999 my $host=$ARGV[0]; my @test=`tnsping $host`; my $arg=$test[6]; chomp $arg; if ($arg =~ /^OK (.*)/) {print "$arg"; exit 0} else {exit 2;}