#174: Support CSV output from `pidstat`. by tst-ppenev · Pull Request #175 · sysstat/sysstat · GitHub
Skip to content

#174: Support CSV output from pidstat.#175

Open
tst-ppenev wants to merge 5 commits into
sysstat:masterfrom
tst-ppenev:#174-pidstat-csv-output
Open

#174: Support CSV output from pidstat.#175
tst-ppenev wants to merge 5 commits into
sysstat:masterfrom
tst-ppenev:#174-pidstat-csv-output

Conversation

@tst-ppenev

Copy link
Copy Markdown
  • Added a --csv <file_path> option to pidstat for enabling CSV output to a file.
  • Added a P_O_CSV flag that can be added to pidflag to indicate CSV should be output.
  • Added csv_write_header and csv_write_stats functions to pidstat.c for outputting CSV.
  • Added helper functions efprintf and csv_efprintf_s to common.c for writing a formatted string to a file stream with error reporting, and for writing a CSV string quoted according to RFC 4180 respectively.

Fixes #174.

* Bug fix: The 'bytes written', 'bytes read' and 'write bytes cancelled'
  statistics that were output to CSV were calculated improperly, reporting the
  cumulative number of bytes since process start, rather than the number of
  bytes for each sample interval.

* Slight refactor to output CSV stats for children, or tasks, based on the
  `-T` command line option.
@tst-dmendyke

Copy link
Copy Markdown

@soyuka

soyuka commented Aug 14, 2020

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support CSV Output from pidstat

3 participants