-
-
Notifications
You must be signed in to change notification settings - Fork 264
QA fixups and convert Nvidia PMDA to extraunits #2634
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2b5c9d1
nvidia PMDA: metadata changes to use extra units
kmcdonell f99906a
src/pmdas/nvidia/rewrite.conf: (new) add, missed in previous commit
kmcdonell 951ebc2
assorted: pander to (different!) awk on macOS
kmcdonell ad58a57
qa/1559 and qa/1670: rework archive iteration
kmcdonell 97ee943
qa/1675: rework archive iterartion
kmcdonell fbf3997
qa/group: add local (group) for test 1675
kmcdonell bcd79e9
src/pmdas/nvidia/rewrite.conf: fix power units
kmcdonell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| #!/bin/sh | ||
| # PCP QA Test No. 1675 | ||
| # pmlogrewrite extensions to accommodate nvidia PMDA evolution | ||
| # (extra units) | ||
| # | ||
| # Copyright (c) 2026 Ken McDonell. All Rights Reserved. | ||
| # | ||
|
|
||
| if [ $# -eq 0 ] | ||
| then | ||
| seq=`basename $0` | ||
| echo "QA output created by $seq" | ||
| else | ||
| # use $seq from caller, unless not set | ||
| [ -n "$seq" ] || seq=`basename $0` | ||
| echo "QA output created by `basename $0` $*" | ||
| fi | ||
|
|
||
| # get standard environment, filters and checks | ||
| . ./common.product | ||
| . ./common.filter | ||
| . ./common.check | ||
|
|
||
| [ -f $PCP_SYSCONF_DIR/pmlogrewrite/nvidia.conf ] || _notrun "nvidia logrewrite config not installed" | ||
|
|
||
| do_valgrind=false | ||
| if [ "$1" = "--valgrind" ] | ||
| then | ||
| _check_valgrind | ||
| do_valgrind=true | ||
| elif which valgrind >/dev/null 2>&1 | ||
| then | ||
| [ "$PCPQA_VALGRIND" = both ] || \ | ||
| _notrun "valgrind variant qa/1685 will be run" | ||
| fi | ||
|
|
||
| _cleanup() | ||
| { | ||
| cd $here | ||
| $sudo rm -rf $tmp $tmp.* | ||
| } | ||
|
|
||
| status=0 # success is the default! | ||
| trap "_cleanup; exit \$status" 0 1 2 3 15 | ||
|
|
||
| _filter() | ||
| { | ||
| sed \ | ||
| -e "s@$tmp@TMP@g" \ | ||
| -e '/^---/s/old.*/old .../' \ | ||
| -e '/^+++/s/new.*/new .../' \ | ||
| # end | ||
| } | ||
|
|
||
| # real QA test starts here | ||
|
|
||
| for arch in `ls archives/nvidiagpu-*.index 2>/dev/null | sed -e 's/\.index$//'` | ||
| do | ||
| echo | ||
| echo "=== $arch ===" | ||
| rm -f $tmp.* | ||
| if $do_valgrind | ||
| then | ||
| _run_valgrind pmlogrewrite -c $PCP_SYSCONF_DIR/pmlogrewrite/nvidia.conf $arch $tmp | ||
| else | ||
| if ! pmlogrewrite -c $PCP_SYSCONF_DIR/pmlogrewrite/nvidia.conf $arch $tmp | ||
| then | ||
| echo "Arrgh: pmlogrewrite failed" | ||
| _exit 1 | ||
| fi | ||
| fi \ | ||
| | _filter | ||
|
|
||
| export PCP_DERIVED_CONFIG= | ||
| metrics_old=`pminfo -a $arch nvidia | sort` | ||
| metrics_new=`pminfo -a $tmp nvidia | sort` | ||
|
|
||
| echo metadata diffs | ||
| pminfo -dmTtl -a $arch $metrics_old >$tmp.old | ||
| pminfo -dmTtl -a $tmp $metrics_new >$tmp.new | ||
|
|
||
| diff -u $tmp.old $tmp.new | _filter | ||
| done | ||
|
|
||
| # success, all done | ||
| exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| QA output created by 1675 | ||
|
|
||
| === archives/nvidiagpu-0 === | ||
| metadata diffs | ||
| --- TMP.old ... | ||
| +++ TMP.new ... | ||
| @@ -143,7 +143,7 @@ | ||
|
|
||
| nvidia.power PMID: 120.0.21 [Total GPU power consumption ] | ||
| Data Type: 32-bit unsigned int InDom: 120.0 0x1e000000 | ||
| - Semantics: instant Units: none | ||
| + Semantics: instant Units: power (W) | ||
| labels {"agent":"nvidia","device_type":"gpu","domainname":"localdomain","groupid":1000,"hostname":"haro","indom_name":"per gpu","machineid":"9ccf3a72f40b4727b71179ddd6a6d765","units":"milliwatts","userid":1000} | ||
| Help: | ||
| Current power usage for this GPU and its associated circuitry, in milliwatts. | ||
| @@ -594,7 +594,7 @@ | ||
|
|
||
| nvidia.temperature PMID: 120.0.4 [The temperature of the card] | ||
| Data Type: 32-bit unsigned int InDom: 120.0 0x1e000000 | ||
| - Semantics: instant Units: none | ||
| + Semantics: instant Units: temperature (C) | ||
| labels {"agent":"nvidia","device_type":"gpu","domainname":"localdomain","groupid":1000,"hostname":"haro","indom_name":"per gpu","machineid":"9ccf3a72f40b4727b71179ddd6a6d765","units":"degrees celsius","userid":1000} | ||
| Help: | ||
| The temperature of the GPU on the NVIDIA card in degrees celsius. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # nvidia PMDA rewriting rules | ||
| # | ||
|
|
||
| # changes for extra units | ||
| # | ||
| metric nvidia.temperature { | ||
| extraunits -> 0,0,0,0,0,0,TEMPERATURE,C | ||
| } | ||
| metric nvidia.power { | ||
| extraunits -> 0,0,0,0,0,0,POWER,mW | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.