From 3ab2e09c674a3455da30ad623adb2b6ffc3d2dd1 Mon Sep 17 00:00:00 2001 From: Imaanpreet Kaur Date: Fri, 5 Jun 2026 13:41:04 -0600 Subject: [PATCH] Replace pmval and pmstat with pmrep in PCP metrics documentation - Replace pmval with pmrep for live metrics retrieval - Replace pmval --archive with pmrep -a for archived metrics - Replace pmstat with pmrep using SAR metric sets (:sar-u, :sar-r, :sar-d) - Remove deprecated flags (-f, -d) that are not needed with pmrep Benefits: - pmrep can monitor multiple metrics in a single command - Consolidates multiple tools (pmval, pmstat) into one consistent interface - Provides better output formatting options (CSV, JSON, table) - Reduces cognitive load for readers learning PCP monitoring --- .../common/modules/proc_retrieving-live-metrics.adoc | 9 ++++++--- .../modules/ref_retrieving-archived-metrics.adoc | 12 ++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/guides/common/modules/proc_retrieving-live-metrics.adoc b/guides/common/modules/proc_retrieving-live-metrics.adoc index 7c5f0d02d83..bec5c3409e6 100644 --- a/guides/common/modules/proc_retrieving-live-metrics.adoc +++ b/guides/common/modules/proc_retrieving-live-metrics.adoc @@ -10,12 +10,12 @@ You can use the PCP CLI tools to retrieve live metrics. * To print current values of a particular metric, enter the following command: + ---- -# pmval -f 1 disk.partitions.write +# pmrep disk.partitions.write ---- + In this example, metric instances on writes to disk partitions are displayed. PCP converts the number of writes to disk partitions from a counter value to a rate value. -The `-f 1` argument specifies to abbreviate the values to one decimal place. +The output is automatically formatted for readability. + Example output: + @@ -36,5 +36,8 @@ samples: all * To print system performance summary every 2 seconds, enter the following command: + ---- -# pmstat -t 2sec +# pmrep -t 2sec :sar-u :sar-r :sar-d ---- ++ +This displays CPU utilization (`:sar-u`), memory usage (`:sar-r`), and disk activity (`:sar-d`) metrics. + diff --git a/guides/common/modules/ref_retrieving-archived-metrics.adoc b/guides/common/modules/ref_retrieving-archived-metrics.adoc index 598af3f5601..533764f46e7 100644 --- a/guides/common/modules/ref_retrieving-archived-metrics.adoc +++ b/guides/common/modules/ref_retrieving-archived-metrics.adoc @@ -22,17 +22,17 @@ You can use the PCP CLI tools to retrieve metrics from an archive file. + [options="nowrap", subs="verbatim,quotes,attributes"] ---- -# pmval --archive /var/log/pcp/pmlogger/_{foreman-example-com}_/_20230831.00.10_ \ - -f 1 disk.partitions.write +# pmrep -a /var/log/pcp/pmlogger/_{foreman-example-com}_/_20230831.00.10_ \ + disk.partitions.write ---- * List disk write operations per partition, with a 2-second interval, over the time period between 14:00 and 14:15: + [options="nowrap", subs="verbatim,quotes,attributes"] ---- -# pmval --archive /var/log/pcp/pmlogger/_{foreman-example-com}_/_20230831.00.10_ \ - -d -t 2sec \ - -f 3 disk.partitions.write \ - -S @14:00 -T @14:15 +# pmrep -a /var/log/pcp/pmlogger/_{foreman-example-com}_/_20230831.00.10_ \ + -t 2sec \ + -S @14:00 -T @14:15 \ + disk.partitions.write ---- * List average values of all performance metrics, including the time and value of the minimum/maximum, over the time period between 14:00 and 14:30, and format the values as a table: +