[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GNU Parallel Bug Reports [PATCH] parallel: fix --limit "io n" for curren
From: |
Johannes Altmanninger |
Subject: |
GNU Parallel Bug Reports [PATCH] parallel: fix --limit "io n" for current sysstat versions |
Date: |
Fri, 5 Apr 2019 20:00:41 +0200 |
Since sysstat version v11.5.6-19-g754d680 (2017-07), iostat does not output
"Device:" but "Device"
Also remove the colon in comments and fix spelling in the same line.
---
src/niceload | 4 ++--
src/parallel | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/niceload b/src/niceload
index 66e1be9..2ead468 100755
--- a/src/niceload
+++ b/src/niceload
@@ -1140,10 +1140,10 @@ sub io_status {
sub io_status_linux {
- # Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz
avgqu-sz await r_await w_await svctm %util
+ # Device rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz
avgqu-sz await r_await w_await svctm %util
# sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00
my @iostat_out = `LANG=C iostat -x 1 2`;
- # throw away all execpt the last Device:-section
+ # throw away all except the last Device-section
my @iostat;
for(reverse @iostat_out) {
/Device/ and last;
diff --git a/src/parallel b/src/parallel
index 27a07c1..268e754 100755
--- a/src/parallel
+++ b/src/parallel
@@ -5755,7 +5755,7 @@ sub limit($) {
mv $tmp $io_file) &
perl -e '-e $ARGV[0] or exit(1);
for(reverse <>) {
- /Device:/ and last;
+ /Device/ and last;
/(\S+)$/ and $max = $max > $1 ? $max : $1; }
exit ($max < '$limit')' $io_file;
};
--
2.21.0
- GNU Parallel Bug Reports [PATCH] parallel: fix --limit "io n" for current sysstat versions,
Johannes Altmanninger <=