<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1498" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN
class=403480417-20062005>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=403480417-20062005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=403480417-20062005>I am finding some
difficulties for having the check_swap plugin worked in SUN Solaris
operating system. Can you please provide me the working version source code of
the check_swap plugin?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial size=2><STRONG><U>Problem
description</U></STRONG></FONT></SPAN></DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial size=2>We have a question
on the usage of check_swap plugin (version 1.4) on Solaris. The following is an
extract from the print_help() function in check_swap.c</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial
size=2> printf (_("\n\<BR>On Solaris,
if -a specified, uses swap -l, otherwise uses swap -s.\n\<BR>Will be
discrepencies because swap -s counts allocated swap and includes\n\<BR>real
memory\n"));<BR> printf (_("\n\<BR>On
AIX, if -a is specified, uses lsps -a, otherwise uses lsps
-s.\n"));</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial size=2>The above print
statements clearly state that omitting the "-a" argument to the plugin uses
"swap -s" command on Solaris and "lsps -s" command on AIX.</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial size=2>The following is
again an extract from check_swap.c file which executes the "lsps -s" command for
AIX</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial size=2>/* These override
the command used if a summary (and thus ! allswaps) is required */<BR>/* The
summary flag returns more accurate information about swap usage on these OSes
*/<BR># ifdef _AIX<BR> if
(!allswaps)
{<BR>
asprintf(&swap_command, "%s", "/usr/sbin/lsps
-s");<BR>
asprintf(&swap_format, "%s", "%f%*s
%f");<BR>
conv_factor = 1;<BR> }<BR>#
endif</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial size=2>But in the code we
did not find a similar execution of "swap -s" command for Solaris. Could you
point out where the execution of "swap -s" command takes
place.</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial size=2>Here is the output
of the plugin on Solaris 2.6 with & without the "-a"
option.</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial size=2>$ ./check_swap -a -w
10% -c 5%<BR>SWAP CRITICAL: 3% free (6 MB out of 200 MB)
|swap=5MB;20;10;0;200</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial size=2>$ ./check_swap -w
10% -c 5%<BR>SWAP CRITICAL: 3% free (6 MB out of 200 MB)
|swap=5MB;20;10;0;200</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial size=2>$ /usr/sbin/swap
-l<BR>swapfile
dev swaplo blocks free<BR>/dev/dsk/c0t3d0s1
32,25 8 410248 11312</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial size=2>As you can see, the
output of the plugin is always in sync with "swap -l" command. We have observed
the same behavior on Solaris 2.8 and Solaris 9 also.</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=403480417-20062005><FONT face=Arial size=2>Thanks in advance
for any help.</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2>Siva</FONT></DIV>
<DIV align=left><FONT face=v size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>