How to use Performance Co-Pilot?
Environment
- Red Hat Enterprise Linux (RHEL) 7 or later
- Red Hat Enterprise Linux 6.6 or later (with the rhel-6-server-optional-rpms repository enabled)
- Performance Co-Pilot (PCP)
Issue
- How to use Performance Co-Pilot?
- What are the basic steps to make Performance Co-Pilot work?
- Is there a PCP crash course?
Resolution
This kbase focuses on every-day-client-commands. These are available once PCP is installed, for install details refer to Install and start using PCP.
Command Summary
The following basic commands exist within PCP:
- pcp - Summarize an installation, or run a sub-command
- pminfo - Display information about PCP metrics
- pmval - Display the current value for named PCP metrics
- pmrep - an advanced generic performance data reporting tool
- pmdiff - Compare PCP archives and report significant differences
- pmlogsummary - Calculate averages of metrics in PCP archives
The following commands re-implement traditional performance tools:
- pcp free - Memory statistics, like
free - pcp uptime - Uptime and load average statistics, like
uptime - pcp numastat - Non-Uniform Memory Architecture information, like
numastat - pcp vmstat - High-level system VM/CPU stats, like
vmstat - pcp atop - Process information, like
atop - pcp iostat - Input/output statistics for storage, like
iostat - pcp pidstat - per-process status reporter (like
pidstat) - pcp ipcs - IPC stats (like
ipcs)
The following graphical utilities exist:
- pmchart - GUI utility providing graphical display of PCP data
All PCP commands can be used in realtime on systems with PCP installed, can communicate in realtime over the network to a remote host, or can replay against pre-existing PCP log files.
Command Usage
pcp
The pcp command can be used to summarise an installation:
# pcp
Performance Co-Pilot configuration on system.example.com:
platform: Linux system.example.com 4.2.0 #4 SMP Wed Oct 7 17:43:50 AEST 2015 x86_64
hardware: 2 cpus, 4 disks, 1 node, 3952MB RAM
timezone: AEST-10
services: pmcd
pmcd: Version 3.10.3-1, 8 agents, 1 client
pmda: root pmcd proc xfs linux mmv netfilter jbd2
pmlogger: primary logger: /var/log/pcp/pmlogger/system.example.com/20151009.13.15
The pcp command can also be used to run a sub-command.
The pcp free command displays memory statistics, like free:
# pcp free
total used free shared buffers cached
Mem: 4047228 3930064 117164 0 39600 3616772
-/+ buffers/cache: 273692 3773536
Swap 1048572 600 1047972
The pcp uptime command displays uptime and load average statistics, like uptime:
# pcp uptime
13:24:35 up 21:39, 3 users, load average: 0.08, 0.03, 0.05
The pcp numastat command displays Non-Uniform Memory Architecture information, like numastat:
# pcp numastat
node0
numa_hit 212211659
numa_miss 0
numa_foreign 0
interleave_hit 2575
local_node 212211659
other_node 0
See man pcp for more information on sub-commands.
More Examples
$ pmstat -t 1 -T 3
$ pmstat -a /var/log/pcp/pmlogger/localhost.localdomain/<date-time-file-name>
$ pmatop
# recording mode
$ pmatop -w rawfile
# playback mode
$ pmatop -r rawfile
# basic system-level performance monitoring
$ pmcollectl
# subsystem specific performance monitoring
$ pmcollectl -sm
$ pmcollectl -sm –verbose
$ pmcollectl -smcdn –verbose
# record mode
$ pmcollectl -f perf-data -c 3
# playback mode:
$ pmcollectl -p perf-data
# full list of all available metrics:
$ pminfo -F
# fetch and print values for all or specific metrics:
$ pminfo -f
$ pminfo -f <metric>
$ pminfo -F -a /var/log/pcp/pmlogger/localhost.localdomain/<log-file-with-date-time>
# descriptions of all or specific metrics:
$ pminfo -T -d
$ pminfo -T -d <metric>
$ pmval <metric>
$ pmval proc.nprocs
Further Reading
- Index of Performance Co-Pilot (PCP) articles, solutions, tutorials and white papers
- Content from pcp.io is not included.Performance Co-Pilot Documentation
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.