How to Install Performance Co-Pilot on CentOS 7: [4 Easy Steps]

Introduction

In this tutorial, we will learn about how to install Performance Co-Pilot on CentOS 7 using 4 easy steps. Performance Co-Pilot(PCP) is one of the system monitoring tool option available for the Linux operating system. It comes with many features that helps the system administrator to keep the system healthy by tracking everything that goes in the system. Let us first understand a bit about PCP and then we will install the PCP utility in the upcoming section.

 

How to Install Performance Co-Pilot on CentOS 7: [4 Easy Steps]

What is Performance Co-Pilot?

Also read: How to Enable SSH Password Authentication in Linux [8 Easy Steps]

Performance Co-Pilot is an open-source framework and set of tools for monitoring and managing system performance on Unix-like operating system, including Linux. It was originally developed by SGI (Silicon Graphics Inclusive) and has been widely adopted in the Linux ecosystem. It offers several features. Some of them are listed below:

Data Collection:  It allows the collection of a wide range of performance related data from various sources within a system. This includes data on CPU usage, memory utilization, disk I/O, network activity and more.

Logging and Archiving:   It logs performance data to files, making it possible to review historical system performance. This is valuable for troubleshooting issues or identifying long-term trends.

Integration:   PCP can integrate with other monitoring tools such as Grafana, Prometheus and Nagios to provide comprehensive solution for system performance monitoring and alerting.

 

How to Install Performance Co-Pilot on CentOS 7: [4 Easy Steps]

Also read: How to Install Cockpit on CentOS 7: [7 Easy Steps]

Now that we have basic understanding of PCP monitoring tool, let us see how we can install it in CentOS 7 system. Before starting on install step, please make sure prerequisite are set.

Prerequisite

  • Linux CentOS Distro installed
  • Yum repository Enabled
  • Must have root Privilege

Step-1: Search PCP Package in Repository

In this step,  first of all search for the pcp package in yum  repository as shown below. We see that there are several pcp tools are available in the repository for install and use.

[root@linuxnasa-server ~]# yum search pcp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.far.fi
* centos-qemu-ev: centos.mirror.far.fi
* epel: mirror.cspacehostings.com
* extras: centos.mirror.far.fi
* updates: centos.mirror.far.fi
================================================================== N/S matched: pcp ==================================================================
cockpit-pcp.x86_64 : Cockpit PCP integration
openlmi-pcp.noarch : pywbem providers for accessing PCP metrics
pcp-devel.i686 : Performance Co-Pilot (PCP) development tools and documentation
pcp-devel.x86_64 : Performance Co-Pilot (PCP) development tools and documentation
pcp-export-pcp2elasticsearch.x86_64 : Performance Co-Pilot tools for exporting PCP metrics to ElasticSearch
pcp-export-pcp2xml.x86_64 : Performance Co-Pilot tools for exporting PCP metrics in XML format
pcp-export-pcp2zabbix.x86_64 : Performance Co-Pilot tools for exporting PCP metrics to Zabbix

pcp-pmda-mysql.x86_64 : Performance Co-Pilot (PCP) metrics for MySQL
pcp-pmda-named.x86_64 : Performance Co-Pilot (PCP) metrics for Named
pcp-pmda-netfilter.x86_64 : Performance Co-Pilot (PCP) metrics for Netfilter framework
pcp-pmda-news.x86_64 : Performance Co-Pilot (PCP) metrics for Usenet News
pcp-pmda-nfsclient.x86_64 : Performance Co-Pilot (PCP) metrics for NFS Clients
pcp-pmda-nginx.x86_64 : Performance Co-Pilot (PCP) metrics for the Nginx Webserver
pcp-pmda-nvidia-gpu.x86_64 : Performance Co-Pilot (PCP) metrics for the Nvidia GPU
.......................................................................................

.......................................................................................
pcp-pmda-snmp.x86_64 : Performance Co-Pilot (PCP) metrics for Simple Network Management Protocol
pcp-pmda-summary.x86_64 : Performance Co-Pilot (PCP) summary metrics from pmie
pcp-pmda-systemd.x86_64 : Performance Co-Pilot (PCP) metrics from the Systemd journal
pcp-pmda-trace.x86_64 : Performance Co-Pilot (PCP) metrics for application tracing
pcp-testsuite.x86_64 : Performance Co-Pilot (PCP) test suite
pcp-webapi.x86_64 : Performance Co-Pilot (PCP) web API service
.........................................................................................

........................................................................................
pcp-gui.x86_64 : Visualization tools for the Performance Co-Pilot toolkit
pcp-libs.i686 : Performance Co-Pilot run-time libraries
pcp-libs.x86_64 : Performance Co-Pilot run-time libraries
pcp-selinux.x86_64 : Selinux policy package
php-phpunit-phpcpd.noarch : Copy/Paste Detector (CPD) for PHP code

Name and summary matches only, use "search all" for everything.

 

Step-2: Install PCP Package

In this step , we will install couple of required pcp tools which are available in the repository as shown below.

[root@linuxnasa-server ~]# yum install pcp pcp-system-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.far.fi
* centos-qemu-ev: centos.mirror.far.fi
* epel: mirror.cspacehostings.com
* extras: centos.mirror.far.fi
* updates: centos.mirror.far.fi
Package pcp-4.3.2-13.el7_9.x86_64 already installed and latest version
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
--> Running transaction check
---> Package pcp-system-tools.x86_64 0:4.3.2-13.el7_9 will be installed
--> Processing Dependency: python-pcp = 4.3.2-13.el7_9 for package: pcp-system-tools-4.3.2-13.el7_9.x86_64
--> Running transaction check
---> Package python-pcp.x86_64 0:4.3.2-13.el7_9 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================
Installing:
pcp-system-tools x86_64 4.3.2-13.el7_9 updates 177 k
Installing for dependencies:
python-pcp x86_64 4.3.2-13.el7_9 updates 143 k

Transaction Summary
======================================================================================================================================================
Install 1 Package (+1 Dependent package)

Total download size: 320 k
Installed size: 932 k
Is this ok [y/d/N]: y
Downloading packages:
(1/2): pcp-system-tools-4.3.2-13.el7_9.x86_64.rpm | 177 kB 00:00:00
(2/2): python-pcp-4.3.2-13.el7_9.x86_64.rpm | 143 kB 00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------------
Total 2.1 MB/s | 320 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
** Found 15 pre-existing rpmdb problem(s), 'yum check' output follows:
bash-4.2.46-35.el7_9.x86_64 is a duplicate with bash-4.2.46-34.el7.x86_64
chkconfig-1.7.6-1.el7.x86_64 is a duplicate with chkconfig-1.7.4-1.el7.x86_64
cpio-2.11-28.el7.x86_64 is a duplicate with cpio-2.11-27.el7.x86_64
expat-2.1.0-15.el7_9.x86_64 is a duplicate with expat-2.1.0-11.el7.x86_64
1:grub2-common-2.02-0.87.0.2.el7.centos.11.noarch is a duplicate with 1:grub2-common-2.02-0.81.el7.centos.noarch
libstdc++-4.8.5-44.el7.x86_64 is a duplicate with libstdc++-4.8.5-39.el7.x86_64
libuuid-2.23.2-65.el7_9.1.x86_64 is a duplicate with libuuid-2.23.2-63.el7.x86_64
nspr-4.34.0-3.1.el7_9.x86_64 is a duplicate with nspr-4.21.0-1.el7.x86_64
nss-util-3.79.0-1.el7_9.x86_64 is a duplicate with nss-util-3.44.0-4.el7_7.x86_64
4:perl-5.16.3-299.el7_9.x86_64 is a duplicate with 4:perl-5.16.3-295.el7.x86_64
4:perl-libs-5.16.3-299.el7_9.x86_64 is a duplicate with 4:perl-libs-5.16.3-295.el7.x86_64
4:perl-macros-5.16.3-299.el7_9.x86_64 is a duplicate with 4:perl-macros-5.16.3-295.el7.x86_64
sed-4.2.2-7.el7.x86_64 is a duplicate with sed-4.2.2-6.el7.x86_64
xz-libs-5.2.2-2.el7_9.x86_64 is a duplicate with xz-libs-5.2.2-1.el7.x86_64
zlib-1.2.7-21.el7_9.x86_64 is a duplicate with zlib-1.2.7-20.el7_9.x86_64
Installing : python-pcp-4.3.2-13.el7_9.x86_64 1/2
Installing : pcp-system-tools-4.3.2-13.el7_9.x86_64 2/2
Verifying : pcp-system-tools-4.3.2-13.el7_9.x86_64 1/2
Verifying : python-pcp-4.3.2-13.el7_9.x86_64 2/2

Installed:
pcp-system-tools.x86_64 0:4.3.2-13.el7_9

Dependency Installed:
python-pcp.x86_64 0:4.3.2-13.el7_9

Complete!

 

Step-3: Run PMCD Daemon

In this step, we will run the pmcd which is the main daemon for pcp. We can also check daemon’s current status using below commands in sequence.

[root@linuxnasa-server ~]# systemctl enable --now pmcd
Created symlink from /etc/systemd/system/multi-user.target.wants/pmcd.service to /usr/lib/systemd/system/pmcd.service.

[root@linuxnasa-server ~]# systemctl status pmcd pmcd.service - Performance Metrics Collector Daemon
Loaded: loaded (/usr/lib/systemd/system/pmcd.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2023-09-02 16:18:25 IST; 9s ago
Docs: man:pmcd(8)
Process: 1151842 ExecStart=/usr/share/pcp/lib/pmcd start (code=exited, status=0/SUCCESS)
Main PID: 1151926 (pmcd)
Tasks: 7
Memory: 6.8M
CGroup: /system.slice/pmcd.service
├─1151926 /usr/libexec/pcp/bin/pmcd
├─1151931 /var/lib/pcp/pmdas/root/pmdaroot
├─1151932 /var/lib/pcp/pmdas/proc/pmdaproc -d 3
├─1151933 /var/lib/pcp/pmdas/xfs/pmdaxfs -d 11
├─1151934 /var/lib/pcp/pmdas/linux/pmdalinux
└─1151935 /var/lib/pcp/pmdas/kvm/pmdakvm -d 9

 

Step-4: Verify PCP Utility Working

In this step, we will check the system live metrics using pmstat command  as shown below. This command gives us the information about swapped memory, load average, buffer usage, cache usage, pages in(pi) and pages out(po) in swap, block in(bi) and block out(bo) in I/O system and other information.

[root@linuxnasa-server ~]# pmstat
@ Sat Sep 2 16:22:56 2023
loadavg memory swap io system cpu
1 min swpd free buff cache pi po bi bo in cs us sy id
0.38 0 274148 112976 2430m 0 0 0 81 1983 3685 3 3 94
0.35 0 274024 112980 2430m 0 0 0 81 1927 3712 3 3 94

 

Summary

We learnt about PCP and its feature along with its setup on CentOS 7 operating system. Likewise, You can also follow Github PCP Repository to install the PCP on different operating systems.

 

Leave a Comment