More reasonable comment about stdbuf -oL
This commit is contained in:
@@ -831,7 +831,7 @@ execp_markup = 1
|
|||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
# Though unnecessary here, "stdbuf -oL" performs better than fflush() in awk code
|
# Note the use of "stdbuf \-oL" to force the program to flush the output line by line.
|
||||||
execp = new
|
execp = new
|
||||||
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_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_interval = 1
|
||||||
@@ -842,7 +842,6 @@ execp_continuous = 1
|
|||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
# Note the use of "stdbuf \-oL" to force the program to flush the output line by line.
|
|
||||||
execp = new
|
execp = new
|
||||||
execp_command = stdbuf \-oL bwm\-ng \-o csv \-t 1000 | awk \-F ';' '/total/ { printf "Net: %.0f Mb/s\\n", ($5*8/1.0e6) }; fflush(stdout)'
|
execp_command = stdbuf \-oL bwm\-ng \-o csv \-t 1000 | awk \-F ';' '/total/ { printf "Net: %.0f Mb/s\\n", ($5*8/1.0e6) }; fflush(stdout)'
|
||||||
execp_continuous = 1
|
execp_continuous = 1
|
||||||
|
|||||||
@@ -372,14 +372,13 @@ 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># Though unnecessary here, "stdbuf -oL" performs better than fflush() in awk code
|
<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># Note the use of "stdbuf -oL" to force the program to flush the output line by line.
|
||||||
execp = new
|
execp = new
|
||||||
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_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_interval = 1
|
||||||
execp_continuous = 1
|
execp_continuous = 1
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h5 id="network-load">Network load<a name="network-load" href="#network-load" class="md2man-permalink" title="permalink"></a></h5><pre class="highlight plaintext"><code># Note the use of "stdbuf -oL" to force the program to flush the output line by line.
|
<h5 id="network-load">Network load<a name="network-load" href="#network-load" class="md2man-permalink" title="permalink"></a></h5><pre class="highlight plaintext"><code>execp = new
|
||||||
execp = new
|
|
||||||
execp_command = stdbuf -oL bwm-ng -o csv -t 1000 | awk -F ';' '/total/ { printf "Net: %.0f Mb/s\n", ($5*8/1.0e6) }; fflush(stdout)'
|
execp_command = stdbuf -oL bwm-ng -o csv -t 1000 | awk -F ';' '/total/ { printf "Net: %.0f Mb/s\n", ($5*8/1.0e6) }; fflush(stdout)'
|
||||||
execp_continuous = 1
|
execp_continuous = 1
|
||||||
execp_interval = 1
|
execp_interval = 1
|
||||||
|
|||||||
@@ -694,7 +694,7 @@ execp_markup = 1
|
|||||||
##### Memory usage
|
##### Memory usage
|
||||||
|
|
||||||
```
|
```
|
||||||
# Though unnecessary here, "stdbuf -oL" performs better than fflush() in awk code
|
# Note the use of "stdbuf -oL" to force the program to flush the output line by line.
|
||||||
execp = new
|
execp = new
|
||||||
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_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_interval = 1
|
||||||
@@ -704,7 +704,6 @@ execp_continuous = 1
|
|||||||
##### Network load
|
##### Network load
|
||||||
|
|
||||||
```
|
```
|
||||||
# Note the use of "stdbuf -oL" to force the program to flush the output line by line.
|
|
||||||
execp = new
|
execp = new
|
||||||
execp_command = stdbuf -oL bwm-ng -o csv -t 1000 | awk -F ';' '/total/ { printf "Net: %.0f Mb/s\n", ($5*8/1.0e6) }; fflush(stdout)'
|
execp_command = stdbuf -oL bwm-ng -o csv -t 1000 | awk -F ';' '/total/ { printf "Net: %.0f Mb/s\n", ($5*8/1.0e6) }; fflush(stdout)'
|
||||||
execp_continuous = 1
|
execp_continuous = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user