scottchiefbaker / dool

Python3 compatible fork of dstat
GNU General Public License v3.0
323 stars 64 forks source link

Allow to unbuffer csv output #12

Closed msimonin closed 1 year ago

msimonin commented 3 years ago

Add a flag to the command line: -u, --unbuffered

When set the output file (if any) will disable the default python buffering and the output will be flushed after every single line (line buffering mode).

This pach offers the opportunity to

ISSUE TYPE
DSTAT VERSION
Dool 0.9.10 (master version)
SUMMARY

see commit message

felipeportella commented 1 year ago

I applied this patch locally and it solved a issue I was facing when I was defining the --output to a csv in a network share to monitor with a tail -f from another machine ... will be good to have this in the main branch.

scottchiefbaker commented 1 year ago

Apologies... Github was not sending me alerts for issues and pull requests on this repo. I did not see this until just now.

Is this still relevant? I'm working through some backlog.

scottchiefbaker commented 1 year ago

I just landed a bunch of updates to --output that should fix this. Check out the v1.2.0 pre-release. If it does not solve this problem please report back.