Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpstat/sar cpu: different placement of column %steal #159

Open
Pitterling opened this issue Aug 20, 2017 · 5 comments
Open

mpstat/sar cpu: different placement of column %steal #159

Pitterling opened this issue Aug 20, 2017 · 5 comments

Comments

@Pitterling
Copy link

Hi,

column ordering for sar CPU and mpstat is different (%steal is placed behind %irq %soft)

mpstat

16:14:48 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle

sar -C

16:14:48 CPU %usr %nice %sys %iowait %steal %irq %soft %guest %gnice %idle

Any reason? A parser has to distinct between both formats.

thx

@sysstat
Copy link
Owner

sysstat commented Aug 21, 2017

No real reason for that, except historical one.
I can probably change column ordering for mpstat output. Anyway it would be better to rely on JSON output format (also available for mpstat since version 11.5.1) instead of parsing the command's plain output which may be subject to change.

@Pitterling
Copy link
Author

I mainly deal with the big distributions SLES/RHEL. Their recent versions just started to use 10.2 ... it will probably take a while before 11.5.1+ will be part of their standard delivery.

Thanks for the tip with JSON format. Does that mean, that the standard historical data collection will also collect JSON output?

Finally, there is no urgent need to align the column ordering .. your decision.

Thx

@sysstat
Copy link
Owner

sysstat commented Aug 21, 2017

mpstat uses its standard output format or the JSON output format depending on whether option "-o JSON" has been entered on the command line or not.
Wrt sar, data are collected and stored in datafiles in binary format (/var/log/sa/saDD). You can use sadf to display their contents in specific formats like JSON. See sadf(1) manual page.

@Pitterling
Copy link
Author

thx .. i was more referring to the crontab configuration creating the daily activity reporting (sarXX textfiles)

All examples still use "sa2 -A" only to create the daily activity file ... is that something you consider to change to the JSON output?

@sysstat
Copy link
Owner

sysstat commented Aug 25, 2017

So maybe it would be useful for the user to have a mean to choose the output format for daily reports (plain text, JSON, XML...) ? I will think about that...
Thanks.

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

No branches or pull requests

2 participants