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

Investigation into Replacing pidstat Tool Implementation #2815

Open
portante opened this issue May 3, 2022 · 4 comments
Open

Investigation into Replacing pidstat Tool Implementation #2815

portante opened this issue May 3, 2022 · 4 comments
Assignees
Labels
Agent PCP Of and relating to PCP integration tools Of and related to the operation and behavior of various tools (iostat, sar, etc.)
Projects

Comments

@portante
Copy link
Member

portante commented May 3, 2022

Investigation into Replacing pidstat Tool Implementation

The pidstat Pbench Agent tool is a wrapper around the sysstat v12.0.3-1 version of the pidstat command. The specific version is because the Pbench Agent wrapper, pidstat-convert (agent/tool-scripts/datalog/), understands a very specific output format, and v12.0.3-1 was the last version of sysstat against which it is verified to work.

The ultimate invocation of the pidstat command looks like the following:

  • pidstat -l -H -w -u -h -d -r -p ALL
    • The -t switch can be added via tool registration using:
      • pbench-register-tool --name=pidstat -- --threads
    • The user can also specify a command pattern regurlar expression using:
      • pbench-register-tool --name=pidstat -- --patterns="(apache|httpd|*nginx*)"
      • This results in -C (apache|httpd|*nginx*) being added to the pidstat command line
    • The user can also add specific pidstat options by using:
      • pbench-register-tool --name=pidstat -- --options='-s -v'
      • But that is not recommended since an arbitrary option could change how the output is formatted and cause the post-processing step to fail

What About Using the pcp pidstat Command?

Not an option at this time because not all the options used currently are supported by pcp pidstat. Here are the unsupported options:

  • -H -- Does not support this option, but does support emitting time stamps in seconds since the Epoch using -f '%s'
  • -w -- Does not support reporting task switching data
  • -u -- Does not support reporting CPU utilization
  • -h -- Does not support one-line reporting request (no averages)
  • -d -- Does not support I/O statistics reporting
  • -p ALL -- Does not appear to work, as no statistics are reported

Without these options we cannot use pcp-pidstat as a direct replacement.

However, we probably wouldn't want to since we really don't want to replace the command as is, but move to a PCP archive collection directly, and then have the data generated from the archive for compatibility.

@portante portante added Agent Backlog tools Of and related to the operation and behavior of various tools (iostat, sar, etc.) labels May 3, 2022
@portante portante added this to To do in Agent via automation May 3, 2022
@portante
Copy link
Member Author

portante commented May 4, 2022

Filed PR performancecopilot/pcp#1586 to fix the pcp pidstat -p ALL handling.

@portante
Copy link
Member Author

portante commented May 4, 2022

Filed PR performancecopilot/pcp#1587 to add the -u switch.

@portante
Copy link
Member Author

portante commented May 4, 2022

Filed PR performancecopilot/pcp#1588 to add the -w switch.

@portante
Copy link
Member Author

portante commented May 4, 2022

Started work to add -d support to pcp pidstat, and then we can consider working on -h support to get one line output.

However, to replace pidstat data collection with PCP for Pbench, all I think we need to do is generate a list of metrics that a pmlogger can collect so that pcp pidstat can read from it later.

@portante portante self-assigned this May 11, 2022
@portante portante added PCP Of and relating to PCP integration and removed Backlog labels May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agent PCP Of and relating to PCP integration tools Of and related to the operation and behavior of various tools (iostat, sar, etc.)
Projects
No open projects
Agent
  
To do
Development

No branches or pull requests

1 participant