Swap Memory issue on Solaris Server
Posted: Tue Feb 06, 2018 9:20 am
Hi,
we are monitoring Swap Memory on linux/solaris servers and its working fine for all except two Solaris server. we are using common services method using hostgroup (adding that group all common services added automatically) on these two servers all services are working fine but only on swap memory we are getting output as " UNKNOWN: Unknown output from '/usr/local/bin/top -n " ..
Steps done --
we have verified configuration with working Solaris server, all are same.
Add/remove server.
Tried with monitoring with swap memory services only.
Tried with adding server with Configuration wizard.
Notable point :
when we checked plugin which we are using to fetch the swap memory status, it is printing output from line No. 231 as UNKNOWN.... need your help over here...
--------------------
223 }
224 elsif( $method eq "top" && $cmdout =~ /^Memory: \d+[kMGT]? phys mem, \d+[kMGT]? free mem, (\d+)([kMGT]?) total swap, (\d+)([kMGT]?) free swap$/) {
225 ( $total_val, $total_uom, $available_val, $available_uom) =
226 ( $1, $2, $3, $4);
227 $total = valuom2bytes( $total_val, $total_uom);
228 $available = valuom2bytes( $available_val, $available_uom);
229 }
230 else {
231 print "UNKNOWN: Unknown output from '$cmd': '$cmdout'\n";
232 exit( $STATUS{ 'UNKNOWN'});
-------------------------
Details from server on which we are having swap memory issue.
OS == SunOS *** 5.10 Generic_150400-52 sun4u sparc SUNW,SPARC-Enterprise
nagios$ /usr/local/bin/top -n
load averages: 11.32, 13.96, 15.05 03:59:45
427 processes: 420 sleeping, 7 on cpu
Memory: 64G real, 26G free, 12G swap in use, 47G swap free
Error from Command --
nagios$ ./check_swap.pl -w 80 -c 70
UNKNOWN: Unknown output from '/usr/local/bin/top -n | /usr/bin/grep Memory': 'Memory: 64G real, 26G free, 12G swap in use, 47G swap free
we are monitoring Swap Memory on linux/solaris servers and its working fine for all except two Solaris server. we are using common services method using hostgroup (adding that group all common services added automatically) on these two servers all services are working fine but only on swap memory we are getting output as " UNKNOWN: Unknown output from '/usr/local/bin/top -n " ..
Steps done --
we have verified configuration with working Solaris server, all are same.
Add/remove server.
Tried with monitoring with swap memory services only.
Tried with adding server with Configuration wizard.
Notable point :
when we checked plugin which we are using to fetch the swap memory status, it is printing output from line No. 231 as UNKNOWN.... need your help over here...
--------------------
223 }
224 elsif( $method eq "top" && $cmdout =~ /^Memory: \d+[kMGT]? phys mem, \d+[kMGT]? free mem, (\d+)([kMGT]?) total swap, (\d+)([kMGT]?) free swap$/) {
225 ( $total_val, $total_uom, $available_val, $available_uom) =
226 ( $1, $2, $3, $4);
227 $total = valuom2bytes( $total_val, $total_uom);
228 $available = valuom2bytes( $available_val, $available_uom);
229 }
230 else {
231 print "UNKNOWN: Unknown output from '$cmd': '$cmdout'\n";
232 exit( $STATUS{ 'UNKNOWN'});
-------------------------
Details from server on which we are having swap memory issue.
OS == SunOS *** 5.10 Generic_150400-52 sun4u sparc SUNW,SPARC-Enterprise
nagios$ /usr/local/bin/top -n
load averages: 11.32, 13.96, 15.05 03:59:45
427 processes: 420 sleeping, 7 on cpu
Memory: 64G real, 26G free, 12G swap in use, 47G swap free
Error from Command --
nagios$ ./check_swap.pl -w 80 -c 70
UNKNOWN: Unknown output from '/usr/local/bin/top -n | /usr/bin/grep Memory': 'Memory: 64G real, 26G free, 12G swap in use, 47G swap free