bug-parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU Parallel Bug Reports niceload on debian (iostat format)


From: Christian Jobic
Subject: GNU Parallel Bug Reports niceload on debian (iostat format)
Date: Wed, 26 Oct 2011 18:59:07 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello,

niceload not work correctly on Debian. The problem is the output format
of iostat on Debian.

We have on niceload :
---8<-------------------------------
630 sub io_status_linux {
631     # Device: rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz 
avgqu-sz   await r_await w_await  svctm  %util
632     # 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
633     my @iostat_out = `LANG=C iostat -x 1 2`;
634     # throw away all execpt the last Device:-section
635     my @iostat;
636     for(reverse @iostat_out) {
637         /Device:/ and last;
638         push @iostat, (split(/\s+/,$_))[13];
639     }
640     my $io = ::max(@iostat);
641     return $io/10;
642 }
---8<-------------------------------


On Debian stable and old-stable (squeeze and lenny, the pb is the same on 
ubuntu LTS)
the format of iostat is like :

---8<-------------------------------
Linux 2.6.32-5-vserver-686-bigmem (pc5014)     10/26/11    _i686_  (4 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2.93    0.14    1.63    0.26    0.00   95.03

Device:         rrqm/s   wrqm/s     r/s     w/s   rsec/s   wsec/s avgrq-sz 
avgqu-sz   await  svctm  %util
sda               0.79     9.53    1.14    4.01    44.68   108.66    29.82     
0.04    6.47   1.49   0.77

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           4.15    0.00    2.44    0.00    0.00   93.41

Device:         rrqm/s   wrqm/s     r/s     w/s   rsec/s   wsec/s avgrq-sz 
avgqu-sz   await  svctm  %util
sda               0.00    14.00    0.00    4.00     0.00   144.00    36.00     
0.00    0.00   0.00   0.00
---8<-------------------------------

On line 638 the '13' is not good (we have 12 args and not 14).
I suggest to replace the line 638 :
---8<-------------------------------
638         push @iostat, (split(/\s+/,$_))[13];
---8<-------------------------------
by
---8<-------------------------------
638         push @iostat, (split(/\s+/,$_))[-1];
---8<-------------------------------

The '-1' is the last arg of the iostat's line, its work for me.

Big tanks for GNU parallel !

Sory for my very bad english.

Cordialement,
-- 
C-Jobic - LCPC

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]