snipt

Ctrl+h for KB shortcuts

Bash

Promedios de memoria, ejemplo con apache

ps aux|grep apache2|grep -v 'grep'|awk '{s+=$6} END {print "N.Proc",NR," | MemTotal=",s/1024,"M | MemAvg=",(s/NR)/1024,"M"}'
https://snipt.net/embed/1653e3f68ad5ff39a361ea20e3d70e80/
/raw/1653e3f68ad5ff39a361ea20e3d70e80/
1653e3f68ad5ff39a361ea20e3d70e80
bash
Bash
2
2019-07-21T10:46:40
True
False
False
/api/public/snipt/24860/
promedios-de-memoria
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>ps aux<span class="p">|</span>grep apache2<span class="p">|</span>grep -v <span class="s1">&#39;grep&#39;</span><span class="p">|</span>awk <span class="s1">&#39;{s+=$6} END {print &quot;N.Proc&quot;,NR,&quot; | MemTotal=&quot;,s/1024,&quot;M | MemAvg=&quot;,(s/NR)/1024,&quot;M&quot;}&#39;</span> </span></pre></div> </td></tr></table>
apache, bash, procesos, server