Score:0

How to redirect the output of a dstat linux command to a CSV file?

ro flag

When I run the dstat command with csv file output option I get the following errors :

sudo dstat --mem-adv --cpufreq -c --dstat-mem --time --output test.csv

/usr/bin/dstat:2619: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
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):

I am using a Ubuntu 20.04.4 LTS on a 64-bit OS using an AMD® Ryzen 5 3500u with Radeon vega mobile gfx × 8 Processor.

Anyone could help solve this issue or even suggest dstat command combined with another GNU/Linux command to save the stats in a CSV file format ?

WU-TANG avatar
cn flag
https://bugs.launchpad.net/ubuntu/+source/dstat/+bug/1905665
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.