The PCP tool is a very powerful performance analysis monitoring tool introduced in RHEL7/CENTOS7, citing its official site and Red Hat official introduction: Performance Co-pilot (PCP) is an open source, distributed, Metrics gathering and analysis system. This is includes coverage of activity in the areas Of:cpu, disk, memory, swapping, network, NFS, RPC, filesystems, and Per-p Rocess statistics. It can provide an observation platform for the GUI, or it can display the results of the monitoring in Web form by providing data to the front-end platforms such as vectors, Grafana, and Webjs.
I. PCP package installation and command tool use
The core package used for the PCP performance collection is the PCP package, which can be installed directly using Yum-y install PCP, and the system performance related tools can also be obtained by installing Pcp-system-tools.
# Yum Install PCP Pcp-system-tools
The tools contained in the Pcp-system-tools package are similar to many of the commands we used to perform individually:
[Root@localhost ~]# rpm-ql Pcp-system-tools
/usr/bin/pmatop
/usr/bin/pmcollectl
/usr/bin/pmiostat
/usr/libexec/pcp/bin/pcp-atop
/usr/libexec/pcp/bin/pcp-collectl
/usr/libexec/pcp/bin/pcp-dmcache
/usr/libexec/pcp/bin/pcp-free
/usr/libexec/pcp/bin/pcp-iostat
/usr/libexec/pcp/bin/pcp-numastat
/usr/libexec/pcp/bin/pcp-shping
/usr/libexec/pcp/bin/pcp-uptime
/usr/libexec/pcp/bin/pcp-verify
Pmatop is similar to top and atop, Pmiostat is basically the same as the iostat output, and the Pcp-free and free command output are the same. Pmstat (in the PCP bag) is the same as the vmstat result. There are corresponding services in the PCP package, especially the PMCD service is the basis of the back GUI and Web view, you must first start the service before you can provide an interface to the corresponding program for graphics output. The service startup commands are as follows:
# Systemctl Enable PMCD
# Systemctl Start Pmcd.service
# Firewall-cmd--add-port=44321/tcp--permanent
# Firewall-cmd--reload
Second, Pcp-gui view
You can view the performance of a specific metric by installing the Pcp-gui package. The Pcp-gui package has a number of predefined views, such as IO, network, CPU, and so on, if you feel that the system preset view does not meet our requirements, you can customize the view.
# yum-y Install Pcp-gui
After the installation is complete, run Pmchart, I add two views here, the result is as follows:
Pmcharts
Third, Web view
The opening also mentions that PCP can provide data to the vector, Grafana, WEBJS and other front-end platforms to display, by looking at its own Yum source, can also see its supporting front-end type, as follows:
Where the WEBAPI package is a must package, the corresponding front-end package should be installed according to the need.
# yum Install Pcp-webapp-vector Pcp-webapi
# Systemctl Start Pmcd pmwebd
# Systemctl Enable PMCD PMWEBD
These several front-end display of the interface is very beautiful, here are a few screenshots can be seen: