Enhanced example for memory usage executor, sync for all docs
It seems, html help already had one free instance with -s option for persistance, though still used inner non-persistant chain for humanized output.
This commit is contained in:
parent
5b3f9c4662
commit
bba945b3b9
3 changed files with 11 additions and 8 deletions
|
@ -831,10 +831,11 @@ execp_markup = 1
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
|
# "stdbuf -oL" noticed to give better performance than fflush() from awk code
|
||||||
execp = new
|
execp = new
|
||||||
execp_command = free | awk '/^\-/ { printf "Mem: '$(free \-h | awk '/^Mem:/ { print $2 }')' %.0f%%\\n", 100*$3/($3+$4); fflush(stdout) }'
|
execp_command = free -b -s1 | stdbuf -oL awk '/^Mem:/ { printf "Mem: %.1fGi %.0f%%\n", $2 / (2^30), 100 * ($2 - $7) / $2 }'
|
||||||
execp_interval = 5
|
execp_interval = 1
|
||||||
execp_continuous = 0
|
execp_continuous = 1
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
.SS Network load
|
.SS Network load
|
||||||
|
|
|
@ -372,8 +372,9 @@ execp_continuous = 1
|
||||||
execp_interval = 1
|
execp_interval = 1
|
||||||
execp_markup = 1
|
execp_markup = 1
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h5 id="memory-usage">Memory usage<a name="memory-usage" href="#memory-usage" class="md2man-permalink" title="permalink"></a></h5><pre class="highlight plaintext"><code>execp = new
|
<h5 id="memory-usage">Memory usage<a name="memory-usage" href="#memory-usage" class="md2man-permalink" title="permalink"></a></h5><pre class="highlight plaintext"><code># "stdbuf -oL" noticed to give better performance than fflush() from awk code
|
||||||
execp_command = free -s 2 | awk '/^-/ { printf "Mem: '$(free -h | awk '/^Mem:/ { print $2 }')' %.0f%\n", 100*$3/($3+$4); fflush(stdout) }'
|
execp = new
|
||||||
|
execp_command = free -b -s1 | stdbuf -oL awk '/^Mem:/ { printf "Mem: %.1fGi %.0f%%\n", $2 / (2^30), 100 * ($2 - $7) / $2 }'
|
||||||
execp_interval = 1
|
execp_interval = 1
|
||||||
execp_continuous = 1
|
execp_continuous = 1
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
|
@ -694,10 +694,11 @@ execp_markup = 1
|
||||||
##### Memory usage
|
##### Memory usage
|
||||||
|
|
||||||
```
|
```
|
||||||
|
# "stdbuf -oL" noticed to give better performance than fflush() from awk code
|
||||||
execp = new
|
execp = new
|
||||||
execp_command = free | awk '/^-/ { printf "Mem: '$(free -h | awk '/^Mem:/ { print $2 }')' %.0f%%\n", 100*$3/($3+$4); fflush(stdout) }'
|
execp_command = free -b -s1 | stdbuf -oL awk '/^Mem:/ { printf "Mem: %.1fGi %.0f%%\n", $2 / (2^30), 100 * ($2 - $7) / $2 }'
|
||||||
execp_interval = 5
|
execp_interval = 1
|
||||||
execp_continuous = 0
|
execp_continuous = 1
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Network load
|
##### Network load
|
||||||
|
|
Loading…
Reference in a new issue