Side-by-side comparison of PCP tools with legacy tools

Updated -

Table of Contents

The article provides a side-by-side comparison of various PCP tools with other legacy tools, such as provided by sysstat, collectl and other basic tools. All PCP tools provide a common set of advanced features such as live monitoring (local or remote host), archive replay and many other features as described in PCPIntro(1).

Since all PCP data sources (live local host, live remote host or archive) have a uniform metrics namespace that include metadata (metric data type and semantics) associated with every metric name, generic tools such as pmrep(1), pmval(1), pminfo(1), pmprobe(1), and for graphical charts, pmchart(1) and Grafana, can be used to monitor arbitrary metrics with complete separation of the performance data source from the monitoring tool being used. These are extremely powerful features and in many cases completely removes the need to re-create various legacy tools because you can monitor the specific metrics you're interested in using any of the generic tools.

Nevertheless, it's useful to provide PCP equivalents of various common CLI tools since this is what most users are familiar with. PCP has well documented, stable APIs with bindings for C/C++, Python, Perl and also provides generic CLI tools such as pminfo, pmrep and pmprobe intended for use when scripting, so new tools and scripts are easy to develop using your programming language of choice.

This article is intended to complement How does Performance Co-Pilot (PCP) compare with sysstat, which provides more of an architectural comparison between sysstat and PCP. Note that in the table below, commands such as "pcp free" are launched by /usr/bin/pcp (in much the same was as e.g. lvm, git and perf can launch sub-commands). See pcp(1) for more details and the relevant pcp-XXX man page, e.g. pcp-free(1). Finally, note that most PCP man pages and other documentation are shipped in the pcp-doc package, so you will probably want to install that.

Legacy Tool PCP Tool Notes / Comments References
iostat pcp iostat I/O statistics - the columns in the pcp iostat report are similar to iostat -x see pcp-iostat(1)
iostat pmchart -c Iostat this is the graphical chart equivalent to pcp-iostat see pmchart(1). The 'Iostat' view is available in pcp-gui-3.11.2-1 and later
dmstat pcp iostat -x dm pcp iostat can monitor device-mapper devices (LVM, multipath, etc) and will map between the dm-XX non-persistent names to the persistent logical device names see pcp-iostat(1). dmstat has additional features such as region/offset specific monitoring of LVM devices based on PV boundaries in underlying VGs, but only monitors LVM devices, which is a subset of all DM devices such as device-mapper-multipath devices, dm-cache devices, etc.
free pcp free pcp-free provides a basic memory usage report see pcp-free(1).
numastat pcp numastat pcp-numastat prints numa statistics and numa topology see pcp-numastat(1)
uptime pcp uptime pcp-uptime prints the load average and uptime time since boot see pcp-uptime(1)
vmstat pcp vmstat pcp-vmstat provides a very similar report to vmstat see pcp-vmstat(1)
mpstat pcp mpstat For graphical CPU monitoring, use pmchart -c CPU or pmchart -c Overview see pmstat(1) and pmchart(1)
netstat -a pmrep use pmrep with appropriate network metrics (e.g. metrics below network.tcp and network.udp in the namespace) see pmrep(1)
netstat -s pminfo -f network will list all network metrics with current value (with no rate conversion of counters). pmrep or pmval can also be used if you want rate conversion see pmval(1), pmrep(1) and pminfo(1) and also run pminfo -t network to list available metrics with basic descriptive help text
netstat -i pmrep network.interface.{in,out}.bytes Append other network.* metrics to the pmrep command line, depending on what you want to monitor see pmrep(1)
ipcs pcp ipcs pcp-ipcs command line options are pretty much compatible with ipcs itself. see pcp-ipcs(1)
pidstat pcp pidstat pcp-pidstat reports per-process metrics see pcp-pidstat(1)
ps pcp ps pcp-ps also reports per-process metrics see pcp-ps(1)
htop pcp htop pcp-htop is an extensible version of htop that uses the PCP APIs see pcp-htop(1) and pcp-htop(5)
atop pcp atop pcp-atop is a port of the actual atop source to the PCP APIs see pcp-atop(1) and pcp-atopsar(1)
collectl -D pmlogger the pmlogger service is PCP's data logger. PCP can also convert raw collectl logs into PCP archives using the collectl2pcp tool. The pmlogger_check(1) tool is particularly useful for setting up a centralized logging "farm" See pmlogger(1), pmlogger_check(1), pmlogger_daily(1) and collectl2pcp(1)
collectl pcp atopsar and generic tools pcp-atopsar provides similar functionality to the collectl client options. Generic PCP monitor tools can also be used of course. see pcp-atopsar(1), pmrep(1), pmval(1), pminfo(1), pmprobe(1), pmchart(1), etc.
sar -A pcp atopsar -A pcp-atopsar is similar to sar -A see pcp-atopsar(1)
sadc pmlogger the pmlogger service is PCP's data logger. See pmlogger(1) and pmlogger_daily(1)
tapestat pcp tapestat, pmrep, pmchart metrics to monitor are below tape.dev in the PCP namespace pcp tapestat(1) is available in pcp, or you can use pmrep(1) or pmchart(1) to monitor scsi tape statistics with the tape.dev.* metrics.
iotop pcp atop and pcp htop pcp-atop, pcp-htop, pmrep, pmval, pmchart and other PCP tools can provide per-process I/O stats see related man pages, particularly pcp-atop(1)
top pcp atop and pcp htop pcp-atop and pcp-htop provide similar functionality to top see pcp-atop(1) and pcp-htop(1)
pmevent, pmdammv, pmdaopenmetrics Event data can be viewed using the pmevent tool and other generic tools. PCP also contains pmdammv (Memory Mapped Values agent) and pmdaopenmetrics which can export metrics from suitably instrumented applications see pmevent(1), PMAPI(3), PCPIntro(1), pmdammv(1), pmdaopenmetrics(1) and related documentation
ceph generic PCP services enabled on each ceph node You can monitor each ceph node in a cluster using generic tools such as Grafana, pmchart, pmrep, etc. For this you would need to install pcp and enable the pmcd service on each ceph node in the cluster. You can also set up centralized logging using pmlogger_check, which will log all nodes in a ceph cluster see pmchart(1), pmlogger(1) and other generic tools, and the relevant ceph documentation

See Also:

  • Component
  • pcp

Comments