Performance Co-Pilot: Part 2, Enabling PMDAs
In my previous post, I introduced Performance Co-Pilot (PCP). I know, I promised the next post to be about logging, but I thought I’d make a short detour and show how to install more PMDAs.
After installing PCP on a Linux system, you will have access to somewhere around 850 various metrics from the three basic PMDAs (pmcd, linux, and mmv). There are many more metrics that you can get at if you enable some of the non-default PMDAs.
I pondered what the best way to present a simple howto would be, and then I realized that simply copying & pasting a session where I install a PMDA will do.
First of all, all the PMDAs live in /var/lib/pcp/pmdas/.
# cd /var/lib/pcp/pmdas/ # ls apache gpsd lustrecomm mounts news process sendmail systemtap vmware bonding kvm mailq mysql pdns roomtemp shping trace weblog cisco linux memcache named pmcd samba simple trivial zimbra dbping lmsensors mmv netfilter postfix sample summary txmon
In this post, I will use the PowerDNS PMDA as an example, but the steps are the same for the other PMDAs.
# cd pdns/ # ls Install Remove pmdapdns.pl
As you can see, there are three files in this directory. We are interested in the Install script. Simply run it as root, and when it asks whether you want a collector, a monitor, or both answer appropriately — if you are running the daemon on the same host, answering both is your best bet. (I never had the need to answer anything else.)
# ./Install You will need to choose an appropriate configuration for installation of the "pdns" Performance Metrics Domain Agent (PMDA). collector collect performance statistics on this system monitor allow this system to monitor local and/or remote systems both collector and monitor configuration for this system Please enter c(ollector) or m(onitor) or b(oth) [b] Updating the Performance Metrics Name Space (PMNS) ... Compiled PMNS contains 197 hash table entries 847 leaf nodes 132 non-leaf nodes 8149 bytes of symbol table Terminate PMDA if already installed ... Updating the PMCD control file, and notifying PMCD ... Check pdns metrics have appeared ... 22 warnings, 60 metrics and 42 values
At this point, the PMDA has been installed (take a look at /etc/pmcd/pmcd.conf to see the new config line there enabling the new PMDA). Now, we can see the new metrics using pminfo (there are many more, I just pruned the list for brevity):
# pminfo pdns pdns.packetcache_hit pdns.tcp_answers pdns.packetcache_miss
We are done!
If you decide to uninstall a PMDA, just cd into the directory and run the Remove script.