<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>: &lt;&lt; =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 &lt;<a href="mailto:rfrail3@yahoo.es">rfrail3@yahoo.es</a>&gt;</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 [ &quot;$1&quot; = &quot;autoconf&quot; ]; 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 [ &quot;$1&quot; = &quot;config&quot; ]; then</div><div><br></div><div><span class="" style="white-space:pre">        </span>echo &#39;graph_title Total memory used by apache&#39;</div>
<div><span class="" style="white-space:pre">        </span>echo &#39;graph_args --base 1000 -l 0 &#39;</div><div><span class="" style="white-space:pre">        </span>echo &#39;graph_vlabel Mb&#39;</div><div><span class="" style="white-space:pre">        </span>echo &#39;graph_scale no&#39;</div>
<div><span class="" style="white-space:pre">        </span>echo &#39;graph_category apache&#39;</div><div><span class="" style="white-space:pre">        </span>echo &#39;graph_info Indicate the total memory used by apache.&#39;</div><div>
<br></div><div>        echo &quot;servers.label servers&quot;</div><div>        echo &quot;servers.type GAUGE&quot;</div><div>        echo &quot;servers.min 0&quot;</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 &#39;{s+=$6} END {print s}&#39;`</div><div><br></div><div>VAL2=`expr $VAL1 / 1024`</div><div><br></div><div>echo &quot;servers.value $VAL2&quot;</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>