Skip to content

Initial support of PCP metrics gathering capability #72

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

malucius-rh
Copy link

Description

This add initial PCP support to the common toolset for the "Zathras family" of workload wrappers as part of the migration from pbench

  • Adds "--use_pcp" option in general_setup
  • Adds PCP infrastrucure including systemd service, default configs for pmlogger and openmetrics, commands and functions for use by wrappers, and sundries

Before/After Comparison

Before: no Zathras-wide support for PCP
After: We have initial support for the use of PCP among the "Zathras family of wrapper"

Clerical Stuff

This closes #71
Relates to JIRA: RPOPC-517

Adds "--use_pcp" option in general_setup
Adds PCP infrastrucure including systemd service, default configs for pmlogger and openmetrics, commands and functions for use by wrappers, and sundries
@malucius-rh malucius-rh requested a review from a team July 7, 2025 23:39
@malucius-rh malucius-rh self-assigned this Jul 7, 2025
@malucius-rh malucius-rh added the enhancement New feature or request label Jul 7, 2025
Copy link

github-actions bot commented Jul 7, 2025

This relates to RPOPC-517

@@ -0,0 +1,134 @@
#!/bin/bash
# Executed by systemd service 'PCPrecord.service'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need GPL license.

pmlogger_running="false" # Initialize service as OFF
om_workload_file="/tmp/openmetrics_workload.txt"
om_workload_file_reset="/tmp/openmetrics_workload_reset.txt"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files created in /tmp should use mktemp to avoid collisions. We do expect one workload one system at a time, but that may not always be the case. Not sure how pcp will behave in this type of situation.

preaction=$(mark_ms)
case "${action_arr[0]}" in
Start) # 'Start $archive_dir $test_name $conf_file'
archive_dir="${action_arr[1]}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have the case sections call a function when there is numerous lines involved.
Makes it easier to read the case statement.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree in principle for larger blocks. However I wouldn't call any of these "numerous;" they're all 15 lines or less so in this case I'd like to keep them in place rather than add to the PgUp-ing and PgDn-ing.

@@ -0,0 +1,131 @@
FIFO="/tmp/pcpFIFO"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPL license please

@@ -0,0 +1,131 @@
FIFO="/tmp/pcpFIFO"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use mktemp for the file please.

@@ -0,0 +1,114 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPL license.

#
# NOTE: use of these Functions require that PCP is already installed on the system
##################################################################################

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indicate we will fail if not installed. We might want an explicit check for it.

mkdir -p "${archive_dir}"

# Run PCP pmlogger
# JTH - VERIFY success, ensure pmlogger starts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug?

echo "Timed out waiting for PMLOGGER to Start1"
exit 30
fi
# Now check that PMLOGGER has started logging
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block left over?

# Stop PCP logger and pause for pmlogger to write archive
pkill -USR1 pmlogger
# Now check that PMLOGGER has stopped logging
timeout 5 bash -c \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is 5 seconds long enough? What happens if there is a lot of data queued up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PCP support needs to be added to the test_tools collection
2 participants