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

Updated

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 ToolPCP ToolNotes / CommentsReferences
iostatpcp iostatI/O statistics - the columns in the pcp iostat report are similar to iostat -xsee pcp-iostat(1)
iostatpmchart -c Iostatthis is the graphical chart equivalent to pcp-iostatsee pmchart(1). The 'Iostat' view is available in pcp-gui-3.11.2-1 and later
dmstatpcp iostat -x dmpcp iostat can monitor device-mapper devices (LVM, multipath, etc) and will map between the dm-XX non-persistent names to the persistent logical device namessee 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.
freepcp freepcp-free provides a basic memory usage reportsee pcp-free(1).
numastatpcp numastatpcp-numastat prints numa statistics and numa topologysee pcp-numastat(1)
uptimepcp uptimepcp-uptime prints the load average and uptime time since bootsee pcp-uptime(1)
vmstatpcp vmstatpcp-vmstat provides a very similar report to vmstatsee pcp-vmstat(1)
mpstatpcp mpstatFor graphical CPU monitoring, use pmchart -c CPU or pmchart -c Overviewsee pmstat(1) and pmchart(1)
netstat -apmrepuse pmrep with appropriate network metrics (e.g. metrics below network.tcp and network.udp in the namespace)see pmrep(1)
netstat -spminfo -f networkwill list all network metrics with current value (with no rate conversion of counters). pmrep or pmval can also be used if you want rate conversionsee pmval(1), pmrep(1) and pminfo(1) and also run pminfo -t network to list available metrics with basic descriptive help text
netstat -ipmrep network.interface.{in,out}.bytesAppend other network.* metrics to the pmrep command line, depending on what you want to monitorsee pmrep(1)
ipcspcp ipcspcp-ipcs command line options are pretty much compatible with ipcs itself.see pcp-ipcs(1)
pidstatpcp pidstatpcp-pidstat reports per-process metricssee pcp-pidstat(1)
pspcp pspcp-ps also reports per-process metricssee pcp-ps(1)
htoppcp htoppcp-htop is an extensible version of htop that uses the PCP APIssee pcp-htop(1) and pcp-htop(5)
atoppcp atoppcp-atop is a port of the actual atop source to the PCP APIssee pcp-atop(1) and pcp-atopsar(1)
collectl -Dpmloggerthe 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)
collectlpcp atopsar and generic toolspcp-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 -Apcp atopsar -Apcp-atopsar is similar to sar -Asee pcp-atopsar(1)
sadcpmloggerthe pmlogger service is PCP's data logger.See pmlogger(1) and pmlogger_daily(1)
tapestatpcp tapestat, pmrep, pmchartmetrics to monitor are below tape.dev in the PCP namespacepcp 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.
iotoppcp atop and pcp htoppcp-atop, pcp-htop, pmrep, pmval, pmchart and other PCP tools can provide per-process I/O statssee related man pages, particularly pcp-atop(1)
toppcp atop and pcp htoppcp-atop and pcp-htop provide similar functionality to topsee pcp-atop(1) and pcp-htop(1)
pmevent, pmdammv, pmdaopenmetricsEvent 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 applicationssee pmevent(1), PMAPI(3), PCPIntro(1), pmdammv(1), pmdaopenmetrics(1) and related documentation
cephgeneric PCP services enabled on each ceph nodeYou 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 clustersee pmchart(1), pmlogger(1) and other generic tools, and the relevant ceph documentation
powertoppmrep denki lmsensorsuse pmrep (or other pcp clients) to access metrics from pmda-denki and pmda-lmsensorssee pmrep(1), pmdadenki(1) man pages

See Also:

Category
Components
Article Type