Oops, avoid gawk coprocess extension
This commit is contained in:
parent
975149642f
commit
60ee870ae5
3 changed files with 3 additions and 3 deletions
|
@ -833,7 +833,7 @@ execp_markup = 1
|
|||
.nf
|
||||
# Though unnecessary here, "stdbuf -oL" performs better than fflush() in awk code
|
||||
execp = new
|
||||
execp_command = free -b -s1 | stdbuf -oL awk '/^Mem:/ { c="numfmt --to=si"; print $2 |& c; c |& getline a; printf "Mem: %s %.0f%%\n", a, 100 * ($2 - $7) / $2 }'
|
||||
execp_command = free -b -s1 | stdbuf -oL awk '/^Mem:/ { printf "Mem: %s %.0f%%\n", $2, 100 * ($2 - $7) / $2 }' | stdbuf -oL numfmt --to=iec-i --field=2 -d' '
|
||||
execp_interval = 1
|
||||
execp_continuous = 1
|
||||
.fi
|
||||
|
|
|
@ -374,7 +374,7 @@ execp_markup = 1
|
|||
</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># Though unnecessary here, "stdbuf -oL" performs better than fflush() in awk code
|
||||
execp = new
|
||||
execp_command = free -b -s1 | stdbuf -oL awk ‘/^Mem:/ { c=“numfmt –to=si”; print $2 |& c; c |& getline a; printf “Mem: %s %.0f%%\n”, a, 100 * ($2 - $7) / $2 }’
|
||||
execp_command = free -b -s1 | stdbuf -oL awk '/^Mem:/ { printf "Mem: %s %.0f%%\n", $2, 100 * ($2 - $7) / $2 }' | stdbuf -oL numfmt --to=iec-i --field=2 -d' '
|
||||
execp_interval = 1
|
||||
execp_continuous = 1
|
||||
</code></pre>
|
||||
|
|
|
@ -696,7 +696,7 @@ execp_markup = 1
|
|||
```
|
||||
# Though unnecessary here, "stdbuf -oL" performs better than fflush() in awk code
|
||||
execp = new
|
||||
execp_command = free -b -s1 | stdbuf -oL awk '/^Mem:/ { c="numfmt --to=si"; print $2 |& c; c |& getline a; printf "Mem: %s %.0f%%\n", a, 100 * ($2 - $7) / $2 }'
|
||||
execp_command = free -b -s1 | stdbuf -oL awk '/^Mem:/ { printf "Mem: %s %.0f%%\n", $2, 100 * ($2 - $7) / $2 }' | stdbuf -oL numfmt --to=iec-i --field=2 -d' '
|
||||
execp_interval = 1
|
||||
execp_continuous = 1
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue