이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 5. Retrieving Metrics


You can retrieve metrics from PCP using the CLI or the web UI interfaces. A number of CLI tools are provided with PCP, which can either output live data, or data from archived sources. The web UI interfaces are provided by the Grafana and Vector web applications. Vector connects directly to the PCP daemon, and can only display live data. Grafana reads from PCP archive files and can display data to up to 1 year old.

5.1. Retrieving Metrics via the CLI

Using the CLI tools provided with PCP, you can retrieve metrics either live, or from an archive file.

5.1.1. Retrieving Live Metrics using CLI

To output metrics on disk partition write instances, enter the following command:

# pmval -f 1 disk.partitions.write
Copy to Clipboard Toggle word wrap

In this example, PCP converts the number of writes to disk partitions from a counter value, to a rate value. The -f 1 specifies that the value be abbreviated to one decimal place.

Example output

metric:    disk.partitions.write
host:      satellite.example.com
semantics: cumulative counter (converting to rate)
units:     count (converting to count / sec)
samples:   all

                 vda1                  vda2                   sr0
                  0.0                  12.0                   0.0
                  0.0                   1.0                   0.0
                  0.0                   1.0                   0.0
                  0.0                   2.0                   0.0
Copy to Clipboard Toggle word wrap

To monitor system metrics with a two second interval:

# pmstat -t 2sec
Copy to Clipboard Toggle word wrap

5.1.2. Retrieving Archived Metrics using CLI

You can use the PCP CLI tools to retrieve metrics from an archive file. To do that, add the --archive parameter and specify the archive file.

  • To list all metrics which were enabled when the archive file was created, enter the following command:

    pminfo --archive archive_file
    Copy to Clipboard Toggle word wrap
  • To confirm the host and time period covered by an archive file, enter the following command:

    # pmdumplog -l archive_file
    Copy to Clipboard Toggle word wrap

Examples

  • To list disk writes for each partition, over the time period covered by the archive file:

    # pmval --archive /var/log/pcp/pmlogger/satellite.example.com/20180816.00.10 \
      -f 1 disk.partitions.write
    Copy to Clipboard Toggle word wrap
  • To list disk write operations per partition, with a two second interval, between the time period 14:00 and 14:15:

    # pmval --archive /var/log/pcp/pmlogger/satellite.example.com/20180816.00.10 \
      -d -t 2sec \
      -f 3 disk.partitions.write \
      -S @14:00 -T @14:15
    Copy to Clipboard Toggle word wrap
  • To list average values of all performance metrics, including the time of minimum/maximum value and the actual minimum/maximum value, between the time period 14:00 and 14:30. To output the values in tabular formatting:

    # pmlogsummary /var/log/pcp/pmlogger/satellite.example.com/20180816.00.10 \
      -HlfiImM \
      -S @14:00 \
      -T @14:30 \
      disk.partitions.write \
      mem.freemem
    Copy to Clipboard Toggle word wrap
  • To list system metrics stored in an archive, starting from 14:00. The metrics are displayed in a format similar to the top tool.

    # pcp --archive /var/log/pcp/pmlogger/satellite.example.com/20180816.00.10 \
      -S @14:00 \
      atop
    Copy to Clipboard Toggle word wrap

5.2. Retrieving Metrics via the Web UI

To access the web UI interfaces to PCP metrics, open the URL of either the following web applications:

Vector
http://satellite.example.com:44323/vector
Grafana
http://satellite.example.com:44323/grafana

Both applications provide a dashboard-style view, with default widgets displaying the values of metrics. You can add and remove metrics to suit your requirements. Also, you can select the time span shown for each widget. Only Grafana provides the option of selecting a custom time range from the archived metrics.

For more details on using Grafana, see the Grafana Labs web site. For more details on using Vector, see the Vector web site.

Figure 5.1. Example Grafana dashboard

Figure 5.2. Example Vector dashboard

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat