in Tools&Framework/azsapsca/patterns/AZSAP/sbdwait-00001.pl [91:119]
sub getSBDwaits {
SDP::Core::printDebug('> getSBDwaits', 'BEGIN');
my $RCODE = 0;
my $FILE_OPEN = 'ha.txt';
my $SECTION = 'sbd -d .* dump';
my @CONTENT = ();
if ( SDP::Core::getSection($FILE_OPEN, $SECTION, \@CONTENT) ) {
foreach $_ (@CONTENT) {
next if ( m/^\s*$/ ); # Skip blank lines
s/\s*//g; # remove all white space
if ( /Timeout.*watchdog.*:/i ) {
(undef, $SBD_WATCHDOG) = split(/:/, $_);
SDP::Core::printDebug(" WATCHDOG", $SBD_WATCHDOG);
$RCODE++;
} elsif ( /Timeout.*msgwait.*:/i ) {
(undef, $SBD_MSGWAIT) = split(/:/, $_);
SDP::Core::printDebug(" MSGWAIT", $SBD_MSGWAIT);
$RCODE++;
}
last if ( $RCODE > 1 ); # use the first sbd dump values found, regardless of the number of sbd partitions
}
} else {
SDP::Core::updateStatus(STATUS_ERROR, "ERROR: getSBDwaits(): Cannot find \"$SECTION\" section in $FILE_OPEN");
}
SDP::Core::updateStatus(STATUS_ERROR, "ERROR: getSBDwaits(): Invalid SBD Metadata, Skipping") if ( $SBD_WATCHDOG == 0 && $SBD_MSGWAIT == 0 );
SDP::Core::printDebug("< getSBDwaits", "Returns: $RCODE");
return $RCODE;
}