<div dir="ltr">Pessoal estou tentando rodar um plugin obtido no git hub porem ele me da erro de saida ao tentar obter os dados. esse é o script juntamento com o erro abaixo.<div>parece que na expr.<br><div><br></div><div><br>
</div><div><div>2013/05/12-19:56:07 [3193] Error output from apache_tmemmory:</div><div>2013/05/12-19:56:07 [3193] expr: syntax error</div><div><br></div><div><br></div><div><br><div><div>#!/bin/sh</div><div># -*- sh -*-</div>
<div><br></div><div>: << =cut</div><div><br></div><div>=head1 NAME</div><div><br></div><div>apache_tmemmory -Indicate the total memory used by apache</div><div><br></div><div>=head1 CONFIGURATION</div><div><br></div>
<div>[apache_*]</div><div>env.binname apache_binary_name</div><div><br></div><div>=head1 AUTHOR</div><div><br></div><div>Ricardo Fraile <<a href="mailto:rfrail3@yahoo.es">rfrail3@yahoo.es</a>></div><div><br></div><div>
=head1 LICENSE</div><div><br></div><div>GPLv2</div><div><br></div><div>=head1 MAGICK MARKERS</div><div><br></div><div> #%# family=auto</div><div> #%# capabilities=autoconf</div><div><br></div><div>=cut</div><div><br></div>
<div>. $MUNIN_LIBDIR/plugins/plugin.sh</div><div><br></div><div><br></div><div>USR=$apuser</div><div>PROCS=$binname</div><div><br></div><div><br></div><div>if [ "$1" = "autoconf" ]; then</div><div><span class="" style="white-space:pre">        </span>echo yes </div>
<div><br></div><div><span class="" style="white-space:pre">        </span>exit 0</div><div>fi</div><div><br></div><div>if [ "$1" = "config" ]; then</div><div><br></div><div><span class="" style="white-space:pre">        </span>echo 'graph_title Total memory used by apache'</div>
<div><span class="" style="white-space:pre">        </span>echo 'graph_args --base 1000 -l 0 '</div><div><span class="" style="white-space:pre">        </span>echo 'graph_vlabel Mb'</div><div><span class="" style="white-space:pre">        </span>echo 'graph_scale no'</div>
<div><span class="" style="white-space:pre">        </span>echo 'graph_category apache'</div><div><span class="" style="white-space:pre">        </span>echo 'graph_info Indicate the total memory used by apache.'</div><div>
<br></div><div> echo "servers.label servers"</div><div> echo "servers.type GAUGE"</div><div> echo "servers.min 0"</div><div><br></div><div><span class="" style="white-space:pre">        </span>exit 0</div>
<div>fi</div><div><br></div><div>VAL1=`ps auxf | grep ${PROCS} | grep -v grep | awk '{s+=$6} END {print s}'`</div><div><br></div><div>VAL2=`expr $VAL1 / 1024`</div><div><br></div><div>echo "servers.value $VAL2"</div>
<div><span class="" style="white-space:pre">        </span></div><div><br></div><div><br></div>-- <br>Leandro Paulo<br><br></div></div></div></div></div>