dstat crashes with UnboundLocalError

Bug #297772 reported by Garthako
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dstat (Ubuntu)
Fix Released
Undecided
dag
Nominated for Intrepid by Noel J. Bergman

Bug Description

topcpu module cannot be loaded.
$ dstat --noupdate -M topcpu -M topio --all --load 20 6

Traceback (most recent call last):
  File "/usr/bin/dstat", line 2041, in <module>
    main()
  File "/usr/bin/dstat", line 1986, in main
    o.extract()
  File "/usr/share/dstat/dstat_topcpu.py", line 56, in extract
    self.val['cmd'] = cmd
UnboundLocalError: local variable 'cmd' referenced before assignment

$ lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10

$ aptitude show dstat
Paket: dstat
Version: 0.6.7-1

Regards

Garthako (garthako)
description: updated
Revision history for this message
meux (reinhard-moser) wrote :

Hi,

  it seems this bug or its cause is removed in version 0.6.8 of dstat. See Changelog: http://svn.rpmforge.net/svn/trunk/tools/dstat/ChangeLog

"- Removed complex process name since /proc/pid/cmdline behaves different on new kernels (Adrian Alves)"

 They removed problem causing lines from dstat_topcpu.py and dstat_topmem.py.

Regards

Reinhard

Revision history for this message
Noel J. Bergman (noeljb) wrote :

I cannot reproduce this with 0.6.9svn:

$ dstat --noupdate -M topcpu -M topio --all --load 20 6
-most-expensive- ----most-expensive---- ----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system-- ---load-avg---
  cpu process | i/o process |usr sys idl wai hiq siq| read writ| recv send| in out | int csw | 1m 5m 15m
vmware-vmx 14|vmware-vmx 350k: 44k| 6 9 83 2 0 0| 96k 158k| 0 0 | 80B 368B|1458 2154 | 0.6 0.7 0.9
vmware-vmx 22|Xorg 44k:3456B| 10 10 78 1 0 0|9830B 68k| 365B 540B| 0 0 |2293 5380 | 0.5 0.7 0.9

Revision history for this message
Noel J. Bergman (noeljb) wrote :

Fixed even earlier upstream in what is already committed in Jaunty, but not Intrepid.

dag (dag-wieers)
Changed in dstat (Ubuntu):
assignee: nobody → dag (dag-wieers)
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.