On Fri, 2008-03-14 at 13:07 +0100, Dag Wieers wrote: > On Fri, 14 Mar 2008, Sam Morris wrote: > > > On Fri, 2008-03-14 at 05:29 +0100, Dag Wieers wrote: > >> On Tue, 26 Feb 2008, Sam Morris wrote: > >> > >>> I've only seen the below happen once out of having run dstat dozens of > >>> times, so it's not that high a priority. :) > >>> > >>> ----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system-- > >>> usr sys idl wai hiq siq| read writ| recv send| in out | int csw > >>> 8 0 92 0 0 0| 0 0 | 28k 1452B| 0 0 | 58 257 > >>> 7 2 91 0 0 0| 0 172k| 19k 926B| 0 0 | 67 238 > >>> 7 0 93 0 0 0| 0 0 | 10k 506B| 0 0 | 16 182 > >>> 11 2 87 0 0 0| 0 44k| 23k 1212B| 0 0 | 62 362 > >>> 8 0 92 0 0 0| 0 0 | 23k 1229B| 0 0 | 45 213 > >>> 7 1 91 0 1 0| 0 0 | 10k 530B| 0 0 | 40 203 > >>> 15 2 79 2 2 0| 0 68k| 0 120B| 0 0 | 23 168 > >>> 12 1 86 0 1 0| 0 8192B| 23k 1327B| 0 0 | 76 317 > >>> 8 1 91 0 0 0| 0 0 | 20k 1235B| 0 0 | 37 238 > >>> Traceback (most recent call last): > >>> File "/usr/bin/dstat", line 1969, in ? > >>> main() > >>> File "/usr/bin/dstat", line 1914, in main > >>> o.extract() > >>> File "/usr/bin/dstat", line 511, in extract > >>> self.val[name][i] = 100.0 * (self.cn2[name][i] - self.cn1[name][i]) / > >>> (sum(self.cn2[name]) - sum(self.cn1[name])) > >>> ZeroDivisionError: float division > >> > >> Still I would like to know the circumstances when this happens. Is this > >> possibly a virtual machine ? Have there been other issues, like > >> time-synchronisation problems or hardware related problems ? > > > > Ok, the system is an Acer Aspire 3020 laptop, not a virtual machine. I > > run ntp on the system so I guess it is possible this could have been > > caused by the clock changing (though I don't recall whether I had > > configured ntp at the time of sending this bug). > > > > The laptop has had some odd hardware problems of late, they come and go. > > They usually manifest themselves by the window manager grabbing the > > keyboard, preventing me from switching to other programs. The first few > > times I can usually escape from this by hitting ctrl+alt+/ but > > eventually it doesn't work and I have to hard reset. > > > > So maybe this bug is caused by the underlying hardware being flaky. :) > > Well, a division by zero should never happen, I just don't know how to > prevent this in a way that makes sense (and still provides reliable > numbers). > > I could of course simply continue and erase any values when that happens. > But then people would not report me those cases :-) > > So I guess I am waiting for someone who can reproduce it :-/
Unfortunately I suspect this bug occurs once in a blue moon, and even then, maybe even only on my crappy laptop... I think it would be fine to just print 'erm something went wrong aiee' as a data line (maybe to stderr as long as stdout is flushed first) and then continuing as normal. -- Sam Morris <[EMAIL PROTECTED]>
signature.asc
Description: This is a digitally signed message part