dstat --output is broken

Bug #1905665 reported by Torsten Bronger
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
dstat (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On Ubuntu 20.04,

dstat --output /tmp/foobar

results in a traceback about a missing import:

Traceback (most recent call last):
  File "/usr/bin/dstat", line 2847, in <module>
    main()
  File "/usr/bin/dstat", line 2687, in main
    scheduler.run()
  File "/usr/lib/python3.8/sched.py", line 151, in run
    action(*argument, **kwargs)
  File "/usr/bin/dstat", line 2806, in perform
    oline = oline + o.showcsv() + o.showcsvend(totlist, vislist)
  File "/usr/bin/dstat", line 547, in showcsv
    if isinstance(self.val[name], types.ListType) or isinstance(self.val[name], types.TupleType):
NameError: name 'types' is not defined

Tags: focal
Revision history for this message
Torsten Bronger (bronger) wrote :

Let me hijack my own bug report to declare that the dstat source used by Ubuntu is deceased. https://github.com/dstat-real/dstat is not developed further.

Please consider

https://github.com/scottchiefbaker/dool

or

https://github.com/performancecopilot/pcp/tree/master/src/pcp/dstat

for replacing it.

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dstat (Ubuntu):
status: New → Confirmed
Revision history for this message
Francis Obwogo (francobwogo) wrote :

Edit /usr/bin/dstat and change lines 547 and 552

Change line 547 to:
   if isinstance(self.val[name], (tuple, list)):

Change line 552 to:
   elif isinstance(self.val[name], str):

For more details, please visit https://serverfault.com/questions/996996/dstat-fails-to-start-trying-to-load-python3s-csv

Norbert (nrbrtx)
tags: added: focal
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.