Bug#614978: iotop: All values 0.0 when using -b parameter
Package: iotop Version: 0.4-2 Severity: normal When using the -b parameter which should enable the batch mode every value is reset to 0.0 . Adding other parameters like -P, -a, -n, -k do not change anything. Saving the output of iotop without -b to a file (containing all the control characters) works fine. -- System Information: Debian Release: 6.0 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.37.1 (SMP w/16 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages iotop depends on: ii python [python-ctypes] 2.6.6-3+squeeze5 interactive high-level object-orie ii python-support 1.0.10 automated rebuilding support for P iotop recommends no packages. iotop suggests no packages. -- no debconf information
Bug#614978: iotop: All values 0.0 when using -b parameter
Package: iotop Version: 0.4-2 iotop works fine here. Most values are zeros, but they are true (at least in my case). OP: Have you tried `iotop -bo`? It prevents reporting threads that don't use disk, so the output is not cluttered with entries of zero values. Also there's a simple test: `dd if=/dev/sda of=/dev/null & sleep 4; iotop -b | head; fg` wait for output and then hit Ctrl+C to stop dd. Type carefully as mixing "if" with "of" will blank your disk (assuming it's /dev/sda). -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.37 (SMP w/2 CPU cores) Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages iotop depends on: ii python [python-ctypes] 2.6.6-3+squeeze5 interactive high-level object-orie ii python-support 1.0.11 automated rebuilding support for P iotop recommends no packages. iotop suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#614978: iotop: All values 0.0 when using -b parameter
tags 614978 + unreproducible moreinfo thanks On Thu, 2011-02-24 at 16:34 +, Maier, Uwe wrote: > When using the -b parameter which should enable the batch mode every > value is reset to 0.0 . It works for me, are you sure your system is doing some I/O? Try running "cat /dev/zero > foo & sleep 20s ; kill %1 ; rm -f foo" in another terminal to do 20 seconds worth of I/O and then stop. -- bye, pabs http://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Bug#614978: iotop: All values 0.0 when using -b parameter
Hi Paul, "unreproducible" sounds so familiar During the execution of your request I stumbled upon the following output: root@tcload16:~# iotop -b | grep tar | grep -v -e start -e grep 10459 be/4 root0.00 B/s0.00 B/s 0.00 % 0.00 % tar -cvjf 10459 be/4 root5.57 M/s0.00 B/s 0.00 % 5.70 % tar -cvjf 10459 be/4 root4.76 M/s0.00 B/s 0.00 % 11.75 % tar -cvjf 10459 be/4 root4.72 M/s0.00 B/s 0.00 % 12.90 % tar -cvjf So it's the first shot which fails. Since I intended to call "iotop -b -n1 -P" in my usage scenario I will be hit by that bad first line. The first screen is always wrong btw. Even without -b (e.g. "iotop -d60"). Regards, uwe > -Original Message- > From: Paul Wise [mailto:p...@debian.org] > Sent: Freitag, 25. Februar 2011 04:11 > To: Maier, Uwe; 614...@bugs.debian.org > Cc: control > Subject: Re: Bug#614978: iotop: All values 0.0 when using -b parameter > > tags 614978 + unreproducible moreinfo > thanks > > On Thu, 2011-02-24 at 16:34 +, Maier, Uwe wrote: > > > When using the -b parameter which should enable the batch mode every > > value is reset to 0.0 . > > It works for me, are you sure your system is doing some I/O? Try > running > "cat /dev/zero > foo & sleep 20s ; kill %1 ; rm -f foo" in another > terminal to do 20 seconds worth of I/O and then stop. > > -- > bye, > pabs > > http://wiki.debian.org/PaulWise
Bug#614978: iotop: All values 0.0 when using -b parameter
On Fri, 2011-02-25 at 08:04 +, Maier, Uwe wrote: > During the execution of your request I stumbled upon the following output: ... I can reproduce that with this: terminal 1: $ cat /dev/zero > foo & sleep 10s ; kill %1 ; rm -f foo terminal 2: $ iotop -b | grep 'cat /dev' | grep -v grep 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat /dev/zero 12706 be/4 pabs0.00 B/s 596.83 M/s 0.00 % 27.93 % cat /dev/zero 12706 be/4 pabs0.00 B/s 76.44 M/s 0.00 % 90.68 % cat /dev/zero 12706 be/4 pabs0.00 B/s 91.47 M/s 0.00 % 91.53 % cat /dev/zero 12706 be/4 pabs0.00 B/s 94.96 M/s 0.00 % 91.16 % cat /dev/zero 12706 be/4 pabs0.00 B/s 90.48 M/s 0.00 % 91.51 % cat /dev/zero 12706 be/4 pabs0.00 B/s 79.63 M/s 0.00 % 91.95 % cat /dev/zero 12706 be/4 pabs0.00 B/s 91.01 M/s 0.00 % 90.92 % cat /dev/zero 12706 be/4 pabs0.00 B/s 87.34 M/s 0.00 % 92.27 % cat /dev/zero 12706 be/4 pabs0.00 B/s 22.77 M/s 0.00 % 20.80 % cat /dev/zero 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat /dev/zero 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat /dev/zero 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat /dev/zero 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat /dev/zero 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat /dev/zero 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat /dev/zero > So it's the first shot which fails. > Since I intended to call "iotop -b -n1 -P" in my usage scenario I will be hit > by that bad first line. I can't reproduce it with this: cat /dev/zero > foo & sleep 10s ; iotop -b -n1 -P ; kill %1 ; rm -f foo > The first screen is always wrong btw. Even without -b (e.g. "iotop -d60"). I can't reproduce it with this: cat /dev/zero > foo & sleep 10s ; iotop -d60 ; kill %1 ; rm -f foo -- bye, pabs http://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Bug#614978: iotop: All values 0.0 when using -b parameter
Hi Paul, a.) fails here too b.) fails here c.) fails here Seems your system is different than mine (smp?). Regards, uwe > -Original Message- > From: Paul Wise [mailto:p...@debian.org] > Sent: Freitag, 25. Februar 2011 10:44 > To: Maier, Uwe > Cc: 614...@bugs.debian.org > Subject: RE: Bug#614978: iotop: All values 0.0 when using -b parameter > > On Fri, 2011-02-25 at 08:04 +, Maier, Uwe wrote: > > > During the execution of your request I stumbled upon the following > output: > ... > > I can reproduce that with this: > > terminal 1: $ cat /dev/zero > foo & sleep 10s ; kill %1 ; rm -f foo > terminal 2: $ iotop -b | grep 'cat /dev' | grep -v grep > 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s 596.83 M/s 0.00 % 27.93 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s 76.44 M/s 0.00 % 90.68 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s 91.47 M/s 0.00 % 91.53 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s 94.96 M/s 0.00 % 91.16 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s 90.48 M/s 0.00 % 91.51 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s 79.63 M/s 0.00 % 91.95 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s 91.01 M/s 0.00 % 90.92 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s 87.34 M/s 0.00 % 92.27 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s 22.77 M/s 0.00 % 20.80 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat > /dev/zero > 12706 be/4 pabs0.00 B/s0.00 B/s 0.00 % 0.00 % cat > /dev/zero > > > So it's the first shot which fails. > > Since I intended to call "iotop -b -n1 -P" in my usage scenario I > will be hit by that bad first line. > > I can't reproduce it with this: > > cat /dev/zero > foo & sleep 10s ; iotop -b -n1 -P ; kill %1 ; rm -f foo > > > The first screen is always wrong btw. Even without -b (e.g. "iotop - > d60"). > > I can't reproduce it with this: > > cat /dev/zero > foo & sleep 10s ; iotop -d60 ; kill %1 ; rm -f foo > > -- > bye, > pabs > > http://wiki.debian.org/PaulWise
Bug#614978: iotop: All values 0.0 when using -b parameter
On Fri, 2011-02-25 at 13:14 +, Maier, Uwe wrote: > Hi Paul, > a.) fails here too > b.) fails here > c.) fails here > > Seems your system is different than mine (smp?). I have a 4-core Intel i7 processor, you seems to have many more processors than I do. Guillaume, is the number of CPUs likely to affect the kernel APIs used by iotop or would this be an issue in the iotop code? -- bye, pabs http://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Bug#614978: iotop: All values 0.0 when using -b parameter
I also tried on my QuadXeon workstation and on an old P3 (with old lenny (iotop version 0.2-3)) - all of the different ways to call "iotop -b -n1" show the problem. On all nodes. Seems not to be related to the number of CPUs. Since the output starts right away, to me it looks like there aren't two snapshots taken (or there is no time delay between the both). But that wouldn't explain the different behaviour on our machines. Regards, uwe > -Original Message- > From: Paul Wise [mailto:p...@debian.org] > Sent: Samstag, 26. Februar 2011 06:15 > To: Maier, Uwe; 614...@bugs.debian.org > Cc: Guillaume Chazarain > Subject: Re: Bug#614978: iotop: All values 0.0 when using -b parameter > > On Fri, 2011-02-25 at 13:14 +, Maier, Uwe wrote: > > > Hi Paul, > > a.) fails here too > > b.) fails here > > c.) fails here > > > > Seems your system is different than mine (smp?). > > I have a 4-core Intel i7 processor, you seems to have many more > processors than I do. > > Guillaume, is the number of CPUs likely to affect the kernel APIs used > by iotop or would this be an issue in the iotop code? > > -- > bye, > pabs > > http://wiki.debian.org/PaulWise
Bug#614978: iotop: All values 0.0 when using -b parameter
iotop's scraping loop looks like: read_counters() while running: read_counters() print delta sleep(delay) So there are indeed two reads close to each other at startup. You can see the first read in http://repo.or.cz/w/iotop.git/blob/HEAD:/iotop/data.py#l372: 372 # A first time as we are interested in the delta 373 self.update_process_counts() The first screen of output will be all zero or not depending on the relative speed of iotop and the I/O generating process. So, all bets are off. This is to mimic "top -d" which gives you an output right away and _then_ starts the main loop. There's always "iotop -o" to filter out zero values, so I don't know if there's anything to fix here. -- Guillaume -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#614978: iotop: All values 0.0 when using -b parameter
Hi Guillaume Thanks for the explanation. When you compare that to "top" I must say that my top (part of procps 3.2.8) /does/ deliver values on the first shot. Even with "top -d 3600". Unfortunately "-o" doesn't help in my case (to make a long story short: I'm collecting performance data - and no value means even just that (0.0 != "")). Regards, uwe --- Uwe Maier HP Software phone +49 7031 14 3814 fax +49 7031 14 6831 Schickardstrasse 25 ASM-SMS B32 3M11 71034 Boeblingen Germany > -Original Message- > From: Guillaume Chazarain [mailto:guic...@gmail.com] > Sent: Montag, 14. März 2011 02:49 > To: 614...@bugs.debian.org > Subject: Bug#614978: iotop: All values 0.0 when using -b parameter > > iotop's scraping loop looks like: > > read_counters() > while running: > read_counters() > print delta > sleep(delay) > > So there are indeed two reads close to each other at startup. > You can see the first read in > http://repo.or.cz/w/iotop.git/blob/HEAD:/iotop/data.py#l372: > > 372 # A first time as we are interested in the delta > 373 self.update_process_counts() > > The first screen of output will be all zero or not depending on the > relative speed of iotop and the I/O generating process. So, all bets > are off. > > This is to mimic "top -d" which gives you an output right > away and _then_ starts the main loop. > > There's always "iotop -o" to filter out zero values, so I don't know > if there's anything to fix here. > > -- > Guillaume >
Bug#614978: iotop: All values 0.0 when using -b parameter
On Mon, Mar 14, 2011 at 9:18 AM, Maier, Uwe wrote: > When you compare that to "top" I must say that my top (part of procps 3.2.8) > /does/ deliver values on the first shot. Even with "top -d 3600". Yes, so does iotop. The difference is that top's values are not 0 on the first shot and that's because top waits for half a second between the first two scrapes: http://google.com/codesearch/p?hl=en#trXsL2dV-G8/procps-3.2.7/top.c&l=2947 I'd rather not do that in iotop. -- Guillaume -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org