diff --git a/.pcp.metadata b/.pcp.metadata index 415c058..5aae7e7 100644 --- a/.pcp.metadata +++ b/.pcp.metadata @@ -1 +1 @@ -a18c4e6becb2ddd12ea1cab97f03553aa621e1f2 SOURCES/pcp-3.8.6.src.tar.gz +2fc1f4538e6f222caac31858cc9ae05c8d0579df SOURCES/pcp-3.8.10.src.tar.gz diff --git a/SOURCES/bz1027236.patch b/SOURCES/bz1027236.patch deleted file mode 100644 index 5263f30..0000000 --- a/SOURCES/bz1027236.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit ce06a829733c3f351c57de1b79fdc0be061f6754 -Author: Frank Ch. Eigler -Date: Wed Nov 6 08:28:37 2013 -0500 - - PCP NSS support: use "domestic" rather than "export" cipher suite - - Modern versions of NSS are starting to disable the obsolete and - puny-security "export" suite of ciphers. We certainly shouldn't - limit ourselves to them. - -diff --git a/src/libpcp/src/secureconnect.c b/src/libpcp/src/secureconnect.c -index 4b6803c..c2bb279 100644 ---- a/src/libpcp/src/secureconnect.c -+++ b/src/libpcp/src/secureconnect.c -@@ -400,10 +400,12 @@ __pmInitCertificates(void) - PK11_FreeSlot(slot); - } - -- secsts = NSS_SetExportPolicy(); -- if (secsts != SECSuccess) -- return __pmSecureSocketsError(PR_GetError()); -- -+ /* Some NSS versions don't do this correctly in NSS_SetDomesticPolicy. */ -+ do { -+ const PRUint16 *cipher; -+ for (cipher = SSL_ImplementedCiphers; *cipher != 0; ++cipher) -+ SSL_CipherPolicySet(*cipher, SSL_ALLOWED); -+ } while (0); - SSL_ClearSessionCache(); - - return 0; -diff --git a/src/libpcp/src/secureserver.c b/src/libpcp/src/secureserver.c -index 856df81..c248202 100644 ---- a/src/libpcp/src/secureserver.c -+++ b/src/libpcp/src/secureserver.c -@@ -279,12 +279,12 @@ __pmSecureServerSetup(const char *db, const char *passwd) - goto done; - } - -- secsts = NSS_SetExportPolicy(); -- if (secsts != SECSuccess) { -- __pmNotifyErr(LOG_ERR, "Unable to set NSS export policy: %s", -- pmErrStr(__pmSecureSocketsError(PR_GetError()))); -- goto done; -- } -+ /* Some NSS versions don't do this correctly in NSS_SetDomesticPolicy. */ -+ do { -+ const PRUint16 *cipher; -+ for (cipher = SSL_ImplementedCiphers; *cipher != 0; ++cipher) -+ SSL_CipherPolicySet(*cipher, SSL_ALLOWED); -+ } while (0); - - /* Configure SSL session cache for multi-process server, using defaults */ - secsts = SSL_ConfigMPServerSIDCache(0, 0, 0, NULL); diff --git a/SOURCES/bz1053094.patch b/SOURCES/bz1053094.patch new file mode 100644 index 0000000..1846635 --- /dev/null +++ b/SOURCES/bz1053094.patch @@ -0,0 +1,2332 @@ +commit 20b71acdf7f262ae8b47103f15f1bfe8019edb2b +Author: Nathan Scott +Date: Fri Jan 17 17:32:32 2014 +1100 + + Add man pages for all of the PMDAs currently missing one + + New man pages for the following PMDAs: apache, jbd2, lmsensors, + logger, lustrecomm, mmv, mounts, proc, roomtemp, rpm, systemd, + xfs and the kernel. + +diff --git a/man/man1/GNUmakefile b/man/man1/GNUmakefile +index 18e3379..96da981 100644 +--- a/man/man1/GNUmakefile ++++ b/man/man1/GNUmakefile +@@ -19,33 +19,68 @@ include $(TOPDIR)/src/include/builddefs + + MAN_SECTION = 1 + +-MAN_PAGES = chkhelp.1 dbpmda.1 mkaf.1 newhelp.1 pcp.1 pcpintro.1 \ +- pmafm.1 pmcd.1 pmcd_wait.1 pmclient.1 pmdacisco.1 pmdamailq.1 \ +- pmdasample.1 pmdasendmail.1 pmdasimple.1 pmdate.1 pmdatrace.1 \ +- pmdatrivial.1 pmdatxmon.1 pmdbg.1 pmdumplog.1 pmerr.1 pmgenmap.1 \ +- pmhostname.1 pmie.1 pmie_check.1 pminfo.1 pmlc.1 pmconfig.1 \ +- pmlock.1 pmlogcheck.1 pmlogconf.1 pmlogextract.1 pmlogger.1 \ +- pmlogger_check.1 pmnewlog.1 pmnsadd.1 pmnsdel.1 \ ++MAN_PAGES = \ ++ chkhelp.1 dbpmda.1 mkaf.1 newhelp.1 pcp.1 pcpintro.1 pmafm.1 \ ++ pmcd.1 pmcd_wait.1 pmclient.1 pmconfig.1 pmdbg.1 pmdumplog.1 \ ++ pmerr.1 pmgenmap.1 pmhostname.1 pmie.1 pmie_check.1 pminfo.1 \ ++ pmlc.1 pmlock.1 pmlogcheck.1 pmlogconf.1 pmlogextract.1 \ ++ pmlogger.1 pmlogger_check.1 pmnewlog.1 pmnsadd.1 pmnsdel.1 \ + pmnsmerge.1 pmpost.1 pmprobe.1 pmsocks.1 pmstat.1 pmstore.1 \ +- pmtrace.1 pmval.1 pmdaweblog.1 pmlogsummary.1 pmdashping.1 \ +- pmloglabel.1 genpmda.1 pmproxy.1 pmdasummary.1 pmlogreduce.1 \ ++ pmtrace.1 pmval.1 pmlogsummary.1 pmdate.1 \ ++ pmloglabel.1 genpmda.1 pmproxy.1 pmlogreduce.1 \ + autofsd-probe.1 pmie2col.1 telnet-probe.1 pmsleep.1 pmsignal.1 \ + pmieconf.1 pmiestatus.1 pmevent.1 pmcpp.1 pmlogrewrite.1 \ +- pmdabash.1 pmatop.1 pmcollectl.1 pmwtf.1 collectl2pcp.1 \ +- pmdagfs2.1 pmdagluster.1 pmmgr.1 pmfind.1 ++ pmatop.1 pmcollectl.1 pmwtf.1 collectl2pcp.1 pmmgr.1 pmfind.1 \ ++ \ ++ pmdaapache.1 pmdabash.1 pmdacisco.1 \ ++ pmdagfs2.1 pmdagluster.1 \ ++ pmdakernel.1 \ ++ pmdalogger.1 pmdamailq.1 pmdammv.1 pmdamounts.1 \ ++ pmdasample.1 pmdasendmail.1 pmdashping.1 pmdasimple.1 \ ++ pmdasummary.1 \ ++ pmdatrace.1 pmdatrivial.1 pmdatxmon.1 pmdaweblog.1 \ + +-# same guard as in src/pmwebapi/GNUmakefile +-ifeq "$(HAVE_LIBMICROHTTPD)" "1" +-MAN_PAGES += pmwebd.1 +-endif ++LINUX_PMDA_PAGES = \ ++ pmdalmsensors.1 pmdalustrecomm.1 pmdaproc.1 pmdaxfs.1 pmdajbd2.1 ++ROOMTEMP_PMDA_PAGES = pmdaroomtemp.1 ++SYSTEMD_PMDA_PAGES = pmdasystemd.1 ++RPM_PMDA_PAGES = pmdarpm.1 ++IB_PMDA_PAGES = pmdaib.1 ++WEBD_PAGES = pmwebd.1 + ++ifeq "$(TARGET_OS)" "linux" ++MAN_PAGES += $(LINUX_PMDA_PAGES) ++else ++LSRCFILES += $(LINUX_PMDA_PAGES) ++endif ++ifneq "$(findstring $(TARGET_OS),solaris linux)" "" ++MAN_PAGES += $(ROOMTEMP_PMDA_PAGES) ++else ++LSRCFILES += $(ROOMTEMP_PMDA_PAGES) ++endif ++ifeq "$(HAVE_RPMLIB)" "1" ++MAN_PAGES += $(RPM_PMDA_PAGES) ++else ++LSRCFILES += $(RPM_PMDA_PAGES) ++endif ++ifneq "$(PMDA_SYSTEMD)" "" ++MAN_PAGES += $(SYSTEMD_PMDA_PAGES) ++else ++LSRCFILES += $(SYSTEMD_PMDA_PAGES) ++endif + ifneq "$(PMDA_INFINIBAND)" "" +-MAN_PAGES += pmdaib.1 ++MAN_PAGES += $(IB_PMDA_PAGES) ++else ++LSRCFILES += $(IB_PMDA_PAGES) ++endif ++ifeq "$(HAVE_LIBMICROHTTPD)" "1" ++MAN_PAGES += $(WEBD_PAGES) ++else ++LSRCFILES += $(WEBD_PAGES) + endif + + MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTION) + LSRCFILES = $(MAN_PAGES) +-LSRCFILES += pmtop.1 pmdahotproc.1 + + default :: default_pcp + +diff --git a/man/man1/pmdaapache.1 b/man/man1/pmdaapache.1 +new file mode 100644 +index 0000000..6b489d1 +--- /dev/null ++++ b/man/man1/pmdaapache.1 +@@ -0,0 +1,176 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2014 Red Hat. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PMDAAPACHE 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pmdaapache\f1 \- Apache2 web server performance metrics domain agent (PMDA) ++.SH SYNOPSIS ++\f3$PCP_PMDAS_DIR/apache/pmdaapache\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-U\f1 \f2username\f1] ++[\f3\-S\f1 \f2server\f1] ++[\f3\-P\f1 \f2port\f1] ++[\f3\-L\f1 \f2location\f1] ++.SH DESCRIPTION ++.B pmdaapache ++is a Performance Metrics Domain Agent (PMDA) which extracts ++performance metrics describing the state of an Apache web server. ++.PP ++The ++.B apache ++PMDA exports metrics that measure the request rate, cumulative ++request sizes, uptime and various connection states for active ++clients. ++.PP ++This information is obtained by performing a HTTP request to the ++server status URL, which must be enabled in the ++.I httpd.conf ++configuration file. ++.P ++.ft CW ++.nf ++.in +0.5i ++ExtendedStatus on ++ ++SetHandler server-status ++Order deny,allow ++Deny from all ++Allow from localhost ++ ++.in ++.fi ++.ft 1 ++.PP ++A brief description of the ++.B pmdaapache ++command line options follows: ++.TP 5 ++.B \-d ++It is absolutely crucial that the performance metrics ++.I domain ++number specified here is unique and consistent. ++That is, ++.I domain ++should be different for every PMDA on the one host, and the same ++.I domain ++number should be used for the same PMDA on all hosts. ++.TP ++.B \-l ++Location of the log file. By default, a log file named ++.I apache.log ++is written in the current directory of ++.BR pmcd (1) ++when ++.B pmdaapache ++is started, i.e. ++.B $PCP_LOG_DIR/pmcd . ++If the log file cannot ++be created or is not writable, output is written to the standard error instead. ++.TP ++.B \-S ++Query the Apache status information from the named ++.I server ++rather than the local host. ++.TP ++.B \-P ++Query the Apache status information from the given ++.I port ++rather than the default (80). ++.TP ++.B \-L ++Specify an alternative ++.I location ++for finding the server-status page. ++.TP ++.B \-U ++User account under which to run the agent. ++The default is the unprivileged "pcp" account in current versions of PCP, ++but in older versions the superuser account ("root") was used by default. ++.SH INSTALLATION ++If you want access to the names, help text and values for the apache ++performance metrics, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/apache ++# ./Install ++.in ++.fi ++.ft 1 ++.PP ++If you want to undo the installation, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/apache ++# ./Remove ++.in ++.fi ++.ft 1 ++.PP ++.B pmdaapache ++is launched by ++.BR pmcd (1) ++and should never be executed directly. ++The Install and Remove scripts notify ++.BR pmcd (1) ++when the agent is installed or removed. ++.SH FILES ++.PD 0 ++.TP 10 ++.B $PCP_PMCDCONF_PATH ++command line options used to launch ++.B pmdaapache ++.TP 10 ++.B $PCP_PMDAS_DIR/apache/help ++default help text file for the apache metrics ++.TP 10 ++.B $PCP_PMDAS_DIR/apache/Install ++installation script for the ++.B pmdaapache ++agent ++.TP 10 ++.B $PCP_PMDAS_DIR/apache/Remove ++undo installation script for the ++.B pmdaapache ++agent ++.TP 10 ++.B $PCP_LOG_DIR/pmcd/apache.log ++default log file for error messages and other information from ++.B pmdaapache ++.PD ++.SH "PCP ENVIRONMENT" ++Environment variables with the prefix ++.B PCP_ ++are used to parameterize the file and directory names ++used by PCP. ++On each installation, the file ++.I /etc/pcp.conf ++contains the local values for these variables. ++The ++.B $PCP_CONF ++variable may be used to specify an alternative ++configuration file, ++as described in ++.BR pcp.conf (5). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR httpd (8), ++.BR pmcd (1), ++.BR pcp.conf (5) ++and ++.BR pcp.env (5). +diff --git a/man/man1/pmdajbd2.1 b/man/man1/pmdajbd2.1 +new file mode 100644 +index 0000000..58e2129 +--- /dev/null ++++ b/man/man1/pmdajbd2.1 +@@ -0,0 +1,161 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2014 Red Hat. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PMDAJBD2 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pmdajbd2\f1 \- journal block device (JBD) performance metrics domain agent (PMDA) ++.SH SYNOPSIS ++\f3$PCP_PMDAS_DIR/jbd2/pmdajbd2\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-j\f1 \f2path\f1] ++[\f3\-U\f1 \f2username\f1] ++.SH DESCRIPTION ++.B pmdajbd2 ++is a Performance Metrics Domain Agent (PMDA) which extracts ++performance metrics from the Journal Block Device subsystem ++(version 2) in the Linux kernel. ++These metrics are exported by the kernel in procfs files, ++one file per block device. ++The JBD2 subsystem is used by several filesystems including ++ext3, ext4 and ocfs2. ++.PP ++The ++.B jbd2 ++PMDA exports metrics that measure detailed journal transaction ++information, such as time spent waiting and locked, request ++rates, blocks used and so on. ++.PP ++A brief description of the ++.B pmdajbd2 ++command line options follows (these are only relevant when ++running the PMDA as a daemon, and not as a shared library): ++.TP 5 ++.B \-d ++It is absolutely crucial that the performance metrics ++.I domain ++number specified here is unique and consistent. ++That is, ++.I domain ++should be different for every PMDA on the one host, and the same ++.I domain ++number should be used for the same PMDA on all hosts. ++.TP ++.B \-l ++Location of the log file. By default, when running as a daemon ++a log file named ++.I jbd2.log ++is written in the current directory of ++when ++.B pmdajbd2 ++is started, i.e. ++.BR $PCP_LOG_DIR/pmcd . ++If the log file cannot ++be created or is not writable, output is written to the standard error instead. ++When running in shared library mode, and diagnostic information will ++be written into the ++.B pmcd ++log file, namely ++.BR $PCP_LOG_DIR/pmcd/pmcd.log . ++.TP ++.B \-j ++Allows an alternate path to the jbd2 statistics files to be specified. ++The default path is ++.IR /proc/fs/jbd2 . ++.TP ++.B \-U ++User account under which to run the agent. ++The default is the unprivileged "pcp" account in current versions of PCP, ++but in older versions the superuser account ("root") was used by default. ++.SH INSTALLATION ++This PMDA is installed by default and in the shared library ++mode (rather than as a separate daemon to ++.BR pmcd (1)). ++Thus, the names, help text and values for the jbd2 performance metrics ++should always be available. ++.PP ++If you do not use these metrics you can remove this PMDA, do the ++following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/jbd2 ++# ./Remove ++.in ++.fi ++.ft 1 ++.PP ++If you want to enable the installation again, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/jbd2 ++# ./Install ++.in ++.fi ++.ft 1 ++.PP ++.B pmdajbd2 ++is launched by ++.BR pmcd (1) ++and should never be executed directly. ++The Install and Remove scripts notify ++.BR pmcd (1) ++when the agent is installed or removed. ++.SH FILES ++.PD 0 ++.TP 10 ++.B $PCP_PMCDCONF_PATH ++command line options used to launch ++.B pmdajbd2 ++.TP 10 ++.B $PCP_PMDAS_DIR/jbd2/help ++default help text file for the jbd2 metrics ++.TP 10 ++.B $PCP_PMDAS_DIR/jbd2/Install ++installation script for the ++.B pmdajbd2 ++agent ++.TP 10 ++.B $PCP_PMDAS_DIR/jbd2/Remove ++undo installation script for the ++.B pmdajbd2 ++agent ++.TP 10 ++.B $PCP_LOG_DIR/pmcd/jbd2.log ++default log file for error messages and other information from ++.B pmdajbd2 ++.PD ++.SH "PCP ENVIRONMENT" ++Environment variables with the prefix ++.B PCP_ ++are used to parameterize the file and directory names ++used by PCP. ++On each installation, the file ++.I /etc/pcp.conf ++contains the local values for these variables. ++The ++.B $PCP_CONF ++variable may be used to specify an alternative ++configuration file, ++as described in ++.BR pcp.conf (5). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pmcd (1), ++.BR pcp.conf (5) ++and ++.BR pcp.env (5). +diff --git a/man/man1/pmdakernel.1 b/man/man1/pmdakernel.1 +new file mode 100644 +index 0000000..b8d5203 +--- /dev/null ++++ b/man/man1/pmdakernel.1 +@@ -0,0 +1,157 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2014 Red Hat. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH "KERNEL PMDAS" 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pmdaaix\f1, ++\f3pmdadarwin\f1, ++\f3pmdafreebsd\f1, ++\f3pmdalinux\f1, ++\f3pmdanetbsd\f1, ++\f3pmdaproc\f1, ++\f3pmdasolaris\f1, ++\f3pmdawindows\f1, ++\f3kernel PMDAs\f1 \- operating system kernel performance metrics domain agents ++.SH SYNOPSIS ++\f3$PCP_PMDAS_DIR/aix/pmdaaix\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-U\f1 \f2username\f1] ++.br ++\f3$PCP_PMDAS_DIR/darwin/pmdadarwin\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-U\f1 \f2username\f1] ++.br ++\f3$PCP_PMDAS_DIR/freebsd/pmdafreebsd\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-U\f1 \f2username\f1] ++.br ++\f3$PCP_PMDAS_DIR/linux/pmdalinux\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-U\f1 \f2username\f1] ++.br ++\f3$PCP_PMDAS_DIR/netbsd/pmdanetbsd\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-U\f1 \f2username\f1] ++.br ++\f3$PCP_PMDAS_DIR/solaris/pmdasolaris\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-U\f1 \f2username\f1] ++.br ++\f3$PCP_PMDAS_DIR/windows/pmdawindows\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-U\f1 \f2username\f1] ++.SH DESCRIPTION ++Each supported platform has a kernel Performance Metrics Domain ++Agent (PMDA) which extracts performance metrics from the kernel ++of that platfrom. ++A variety of platform-specific metrics are available, with an ++equally varied set of access mechanisms - typically this involves ++special system calls, or reading from files in kernel virtual ++filesystems such as the Linux ++.I sysfs ++and ++.I procfs ++filesystems. ++.PP ++The platform kernel PMDA is one of the most critical components ++of the PCP installation, and must be as efficient and reliable ++as possible. ++In all installations the default kernel PMDA will be installed ++as a shared library and thus executes directly within the ++.BR pmcd (1) ++process. ++This slightly reduces overheads associated with querying the ++metadata and values associated with these metrics (no message ++passing is required). ++.PP ++Unlike many other PMDAs, the kernel PMDA exports a number of ++metric namespace subtrees, such as kernel, network, swap, mem, ++ipc, filesys, nfs, disk and hinv (hardware inventory). ++.PP ++Despite usually running as shared libraries, most installations ++also include a stand-alone executable for the kernel PMDA. ++This is to aid profiling and debugging activities, with ++.BR dbpmda (1) ++for example. ++In this case (but not for shared libraries), the following ++command line options are available: ++.TP 5 ++.B \-d ++It is absolutely crucial that the performance metrics ++.I domain ++number specified here is unique and consistent. ++That is, ++.I domain ++should be different for every PMDA on the one host, and the same ++.I domain ++number should be used for the same PMDA on all hosts. ++.TP ++.B \-l ++Location of the log file. By default, a log file named ++.I [platform].log ++is written in the current directory of ++.BR pmcd (1) ++when ++.B pmda[platform] ++is started, i.e. ++.BR $PCP_LOG_DIR/pmcd . ++If the log file cannot ++be created or is not writable, output is written to the standard error instead. ++.TP ++.B \-U ++User account under which to run the agent. ++The default is the unprivileged "pcp" account in current versions of PCP, ++but in older versions the superuser account ("root") was used by default. ++.SH INSTALLATION ++Access to the names, help text and values for the kernel performance ++metrics is available by default - unlike most other agents, no action ++is required to enable them and they should not be removed. ++.SH FILES ++.PD 0 ++.TP 10 ++.B $PCP_PMDAS_DIR/[platform]/help ++default help text file for the the kernel metrics ++.TP 10 ++.B $PCP_LOG_DIR/pmcd/pmcd.log ++default log file for error messages and other information from ++the kernel PMDA. ++.PD ++.SH "PCP ENVIRONMENT" ++Environment variables with the prefix ++.B PCP_ ++are used to parameterize the file and directory names ++used by PCP. ++On each installation, the file ++.I /etc/pcp.conf ++contains the local values for these variables. ++The ++.B $PCP_CONF ++variable may be used to specify an alternative ++configuration file, ++as described in ++.BR pcp.conf (5). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR dbpmda (1) ++.BR pmcd (1), ++.BR pcp.conf (5) ++and ++.BR pcp.env (5). +diff --git a/man/man1/pmdalmsensors.1 b/man/man1/pmdalmsensors.1 +new file mode 100644 +index 0000000..e266975 +--- /dev/null ++++ b/man/man1/pmdalmsensors.1 +@@ -0,0 +1,138 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2014 Red Hat. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PMDALMSENSORS 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pmdalmsensors\f1 \- Linux hardware monitoring performance metrics domain agent (PMDA) ++.SH SYNOPSIS ++\f3$PCP_PMDAS_DIR/lmsensors/pmdalmsensors\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-U\f1 \f2username\f1] ++.SH DESCRIPTION ++.B pmdalmsensors ++is a Performance Metrics Domain Agent (PMDA) which extracts ++performance metrics describing the state of hardware using ++the lm-sensors on compatible motherboards. ++.PP ++The ++.B lmsensors ++PMDA exports metrics that measure fan speeds, core temperatures ++and voltage levels. ++.PP ++A brief description of the ++.B pmdalmsensors ++command line options follows: ++.TP 5 ++.B \-d ++It is absolutely crucial that the performance metrics ++.I domain ++number specified here is unique and consistent. ++That is, ++.I domain ++should be different for every PMDA on the one host, and the same ++.I domain ++number should be used for the same PMDA on all hosts. ++.TP ++.B \-l ++Location of the log file. By default, a log file named ++.I lmsensors.log ++is written in the current directory of ++.BR pmcd (1) ++when ++.B pmdalmsensors ++is started, i.e. ++.B $PCP_LOG_DIR/pmcd . ++If the log file cannot ++be created or is not writable, output is written to the standard error instead. ++.TP ++.B \-U ++User account under which to run the agent. ++The default is the unprivileged "pcp" account in current versions of PCP, ++but in older versions the superuser account ("root") was used by default. ++.SH INSTALLATION ++If you want access to the names, help text and values for the lmsensors ++performance metrics, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/lmsensors ++# ./Install ++.in ++.fi ++.ft 1 ++.PP ++If you want to undo the installation, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/lmsensors ++# ./Remove ++.in ++.fi ++.ft 1 ++.PP ++.B pmdalmsensors ++is launched by ++.BR pmcd (1) ++and should never be executed directly. ++The Install and Remove scripts notify ++.BR pmcd (1) ++when the agent is installed or removed. ++.SH FILES ++.PD 0 ++.TP 10 ++.B $PCP_PMCDCONF_PATH ++command line options used to launch ++.B pmdalmsensors ++.TP 10 ++.B $PCP_PMDAS_DIR/lmsensors/help ++default help text file for the lmsensors metrics ++.TP 10 ++.B $PCP_PMDAS_DIR/lmsensors/Install ++installation script for the ++.B pmdalmsensors ++agent ++.TP 10 ++.B $PCP_PMDAS_DIR/lmsensors/Remove ++undo installation script for the ++.B pmdalmsensors ++agent ++.TP 10 ++.B $PCP_LOG_DIR/pmcd/lmsensors.log ++default log file for error messages and other information from ++.B pmdalmsensors ++.PD ++.SH "PCP ENVIRONMENT" ++Environment variables with the prefix ++.B PCP_ ++are used to parameterize the file and directory names ++used by PCP. ++On each installation, the file ++.I /etc/pcp.conf ++contains the local values for these variables. ++The ++.B $PCP_CONF ++variable may be used to specify an alternative ++configuration file, ++as described in ++.BR pcp.conf (5). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pmcd (1), ++.BR pcp.conf (5) ++and ++.BR pcp.env (5). +diff --git a/man/man1/pmdalogger.1 b/man/man1/pmdalogger.1 +new file mode 100644 +index 0000000..846c535 +--- /dev/null ++++ b/man/man1/pmdalogger.1 +@@ -0,0 +1,184 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2014 Red Hat. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PMDALOGGER 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pmdalogger\f1 \- log file performance metrics domain agent (PMDA) ++.SH SYNOPSIS ++\f3$PCP_PMDAS_DIR/logger/pmdalogger\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-m\f1 \f2memory\f1] ++[\f3\-s\f1 \f2interval\f1] ++[\f3\-U\f1 \f2username\f1] ++[\f2configfile\f1] ++.SH DESCRIPTION ++.B pmdalogger ++is a configurable log file monitoring Performance Metrics Domain ++Agent (PMDA). ++It can be seen as analagous to the ++.B \-f ++option to ++.BR tail (1) ++and converts each new log line into a performance event. ++It was the first PMDA to make extensive use of event metrics, which ++can be consumed by client tools like ++.BR pmevent (1). ++.PP ++The ++.B logger ++PMDA exports both event-style metrics reflecting timestamped event records ++for text logged to a file (or set of files or output from a process), ++as well as the more orthodox sample-style metrics such as event counts ++and throughput size values. ++.PP ++The PMDA is configured via a ++.I configfile ++which contains one line for each source of events (file or process). ++This file is setup by the Install script described in the later ++section on ``INSTALLATION'' of the PMDA. ++.PP ++A brief description of the ++.B pmdalogger ++command line options follows: ++.TP 5 ++.B \-d ++It is absolutely crucial that the performance metrics ++.I domain ++number specified here is unique and consistent. ++That is, ++.I domain ++should be different for every PMDA on the one host, and the same ++.I domain ++number should be used for the same PMDA on all hosts. ++.TP ++.B \-l ++Location of the log file. By default, a log file named ++.I logger.log ++is written in the current directory of ++.BR pmcd (1) ++when ++.B pmdalogger ++is started, i.e. ++.BR $PCP_LOG_DIR/pmcd . ++If the log file cannot ++be created or is not writable, output is written to the standard error instead. ++.TP ++.B \-m ++Limit the physical memory used by the PMDA to buffer event records to ++.I maxsize ++bytes. ++As log events arrive at the PMDA, they must be buffered until individual ++client tools request the next batch since their previous batch of events. ++The default maximum is 2 megabytes. ++.TP ++.B \-s ++Sets the polling interval for detecting newly arrived log lines. ++Mirrors the same option from the ++.BR tail (1) ++command. ++.TP ++.B \-U ++User account under which to run the agent. ++The default is the unprivileged "pcp" account in current versions of PCP, ++but in older versions the superuser account ("root") was used by default. ++.SH INSTALLATION ++If you want access to the names, help text and values for the logger ++performance metrics, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/logger ++# ./Install ++.in ++.fi ++.ft 1 ++.PP ++This is an interactive installation process which prompts for each ++log file path to be monitored (or command to be run), a metric ++instance name to identify it, and whether access should be restricted ++(refer to the ++.B \-x ++option to ++.BR pmevent (1) ++for further details). ++.PP ++If you want to undo the installation, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/logger ++# ./Remove ++.in ++.fi ++.ft 1 ++.PP ++.B pmdalogger ++is launched by ++.BR pmcd (1) ++and should never be executed directly. ++The Install and Remove scripts notify ++.BR pmcd (1) ++when the agent is installed or removed. ++.SH FILES ++.PD 0 ++.TP 10 ++.B $PCP_PMCDCONF_PATH ++command line options used to launch ++.B pmdalogger ++.TP 10 ++.B $PCP_PMDAS_DIR/logger/logger.conf ++default configuration file for the logger metrics ++.TP 10 ++.B $PCP_PMDAS_DIR/logger/help ++default help text file for the logger metrics ++.TP 10 ++.B $PCP_PMDAS_DIR/logger/Install ++installation script for the ++.B pmdalogger ++agent ++.TP 10 ++.B $PCP_PMDAS_DIR/logger/Remove ++undo installation script for the ++.B pmdalogger ++agent ++.TP 10 ++.B $PCP_LOG_DIR/pmcd/logger.log ++default log file for error messages and other information from ++.B pmdalogger ++.PD ++.SH "PCP ENVIRONMENT" ++Environment variables with the prefix ++.B PCP_ ++are used to parameterize the file and directory names ++used by PCP. ++On each installation, the file ++.I /etc/pcp.conf ++contains the local values for these variables. ++The ++.B $PCP_CONF ++variable may be used to specify an alternative ++configuration file, ++as described in ++.BR pcp.conf (5). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pmevent (1), ++.BR pmcd (1), ++.BR tail (1), ++.BR pcp.conf (5) ++and ++.BR pcp.env (5). +diff --git a/man/man1/pmdalustrecomm.1 b/man/man1/pmdalustrecomm.1 +new file mode 100644 +index 0000000..dd5fa85 +--- /dev/null ++++ b/man/man1/pmdalustrecomm.1 +@@ -0,0 +1,141 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2014 Red Hat. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PMDALUSTERCOMM 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pmdalustrecomm\f1 \- Lustre filesystem comms performance metrics domain agent (PMDA) ++.SH SYNOPSIS ++\f3$PCP_PMDAS_DIR/lustrecomm/pmdalustrecomm\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-U\f1 \f2username\f1] ++.SH DESCRIPTION ++.B pmdalustrecomm ++is a Performance Metrics Domain Agent (PMDA) which extracts ++performance metrics from the Linux procfs filesystem about ++the state of various aspects of the Lustre filesystem. ++.PP ++The ++.B lustrecomm ++PMDA exports metrics that focus on distributed communication ++in the filesystem, including metrics related to timeouts, ++network drops, send/recv information and route lengths. ++However, it also covers the memory use of some of the Lustre ++filesystem components. ++.PP ++A brief description of the ++.B pmdalustrecomm ++command line options follows: ++.TP 5 ++.B \-d ++It is absolutely crucial that the performance metrics ++.I domain ++number specified here is unique and consistent. ++That is, ++.I domain ++should be different for every PMDA on the one host, and the same ++.I domain ++number should be used for the same PMDA on all hosts. ++.TP ++.B \-l ++Location of the log file. By default, a log file named ++.I lustrecomm.log ++is written in the current directory of ++.BR pmcd (1) ++when ++.B pmdalustrecomm ++is started, i.e. ++.BR $PCP_LOG_DIR/pmcd . ++If the log file cannot ++be created or is not writable, output is written to the standard error instead. ++.TP ++.B \-U ++User account under which to run the agent. ++The default is the unprivileged "pcp" account in current versions of PCP, ++but in older versions the superuser account ("root") was used by default. ++.SH INSTALLATION ++If you want access to the names, help text and values for the lustrecomm ++performance metrics, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/lustrecomm ++# ./Install ++.in ++.fi ++.ft 1 ++.PP ++If you want to undo the installation, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/lustrecomm ++# ./Remove ++.in ++.fi ++.ft 1 ++.PP ++.B pmdalustrecomm ++is launched by ++.BR pmcd (1) ++and should never be executed directly. ++The Install and Remove scripts notify ++.BR pmcd (1) ++when the agent is installed or removed. ++.SH FILES ++.PD 0 ++.TP 10 ++.B $PCP_PMCDCONF_PATH ++command line options used to launch ++.B pmdalustrecomm ++.TP 10 ++.B $PCP_PMDAS_DIR/lustrecomm/help ++default help text file for the lustrecomm metrics ++.TP 10 ++.B $PCP_PMDAS_DIR/lustrecomm/Install ++installation script for the ++.B pmdalustrecomm ++agent ++.TP 10 ++.B $PCP_PMDAS_DIR/lustrecomm/Remove ++undo installation script for the ++.B pmdalustrecomm ++agent ++.TP 10 ++.B $PCP_LOG_DIR/pmcd/lustrecomm.log ++default log file for error messages and other information from ++.B pmdalustrecomm ++.PD ++.SH "PCP ENVIRONMENT" ++Environment variables with the prefix ++.B PCP_ ++are used to parameterize the file and directory names ++used by PCP. ++On each installation, the file ++.I /etc/pcp.conf ++contains the local values for these variables. ++The ++.B $PCP_CONF ++variable may be used to specify an alternative ++configuration file, ++as described in ++.BR pcp.conf (5). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pmcd (1), ++.BR pcp.conf (5) ++and ++.BR pcp.env (5). +diff --git a/man/man1/pmdammv.1 b/man/man1/pmdammv.1 +new file mode 100644 +index 0000000..859b151 +--- /dev/null ++++ b/man/man1/pmdammv.1 +@@ -0,0 +1,177 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2014 Red Hat. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PMDAMMV 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pmdammv\f1 \- memory mapped values performance metrics domain agent (PMDA) ++.SH SYNOPSIS ++\f3$PCP_PMDAS_DIR/mmv/pmdammv\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-U\f1 \f2username\f1] ++.SH DESCRIPTION ++.B pmdammv ++is a Performance Metrics Domain Agent (PMDA) which exports ++application level performance metrics using memory mapped files. ++It offers an extremely low overhead instrumentation facility ++that is well-suited to long running, mission critical applications ++where it is desirable to have performance metrics and availability ++information permanently enabled. ++.PP ++The ++.B mmv ++PMDA exports instrumentation that has been added to an application ++using the MMV APIs (refer to ++.BR mmv_stats_init (3) ++and ++.BR mmv (5) ++for further details). ++These APIs can be called from several languages, including C, C++, ++Perl, Python and Java (via the separate ``Parfait'' class library). ++.PP ++A brief description of the ++.B pmdammv ++command line options follows: ++.TP 5 ++.B \-d ++It is absolutely crucial that the performance metrics ++.I domain ++number specified here is unique and consistent. ++That is, ++.I domain ++should be different for every PMDA on the one host, and the same ++.I domain ++number should be used for the same PMDA on all hosts. ++.TP ++.B \-l ++Location of the log file. By default, a log file named ++.I mmv.log ++is written in the current directory of ++.BR pmcd (1) ++when ++.B pmdammv ++is started, i.e. ++.BR $PCP_LOG_DIR/pmcd . ++If the log file cannot ++be created or is not writable, output is written to the standard error instead. ++.TP ++.B \-U ++User account under which to run the agent. ++The default is the unprivileged "pcp" account in current versions of PCP, ++but in older versions the superuser account ("root") was used by default. ++.SH INSTALLATION ++If you want access to the names, help text and values for the mmv ++performance metrics, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/mmv ++# ./Install ++.in ++.fi ++.ft 1 ++.PP ++Note that the default mechanism for sharing memory mapped values ++between instrumented applications and the ++.B mmv ++PMDA involves the creation of a world-writeable ++.I $PCP_TMP_DIR/mmv ++directory with the sticky-bit set (similar to ++.I /tmp ++and ++.IR /var/tmp , ++for example). ++This suffices to allow any application, running under any user account, ++to communicate with the PMDA (which runs under the "pcp" account by ++default). ++This may not be desirable for every environment, and one should consider ++the security implications of any directory setup like this (similar ++classes of issues exist as those that affect the system temporary file ++directories). ++.PP ++The installation process will not overwrite any existing ++.I $PCP_TMP_DIR/mmv ++directory. ++Thus it is possible to implement an alternate permissions strategy with ++no world-writable directory for sharing files - any directory readable ++by user or group "pcp" will suffice. ++.PP ++If you want to undo the installation, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/mmv ++# ./Remove ++.in ++.fi ++.ft 1 ++.PP ++.B pmdammv ++is launched by ++.BR pmcd (1) ++and should never be executed directly. ++The Install and Remove scripts notify ++.BR pmcd (1) ++when the agent is installed or removed. ++.SH FILES ++.PD 0 ++.TP 10 ++.B $PCP_PMCDCONF_PATH ++command line options used to launch ++.B pmdammv ++.TP 10 ++.B $PCP_TMP_DIR/mmv ++directory housing memory mapped value files ++.TP 10 ++.B $PCP_PMDAS_DIR/mmv/help ++default help text file for the mmv metrics ++.TP 10 ++.B $PCP_PMDAS_DIR/mmv/Install ++installation script for the ++.B pmdammv ++agent ++.TP 10 ++.B $PCP_PMDAS_DIR/mmv/Remove ++undo installation script for the ++.B pmdammv ++agent ++.TP 10 ++.B $PCP_LOG_DIR/pmcd/mmv.log ++default log file for error messages and other information from ++.B pmdammv ++.PD ++.SH "PCP ENVIRONMENT" ++Environment variables with the prefix ++.B PCP_ ++are used to parameterize the file and directory names ++used by PCP. ++On each installation, the file ++.I /etc/pcp.conf ++contains the local values for these variables. ++The ++.B $PCP_CONF ++variable may be used to specify an alternative ++configuration file, ++as described in ++.BR pcp.conf (5). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pmcd (1), ++.BR mmv_stats_init (3), ++.BR mmv (5), ++.BR pcp.conf (5) ++and ++.BR pcp.env (5). +diff --git a/man/man1/pmdamounts.1 b/man/man1/pmdamounts.1 +new file mode 100644 +index 0000000..2de6f41 +--- /dev/null ++++ b/man/man1/pmdamounts.1 +@@ -0,0 +1,147 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2014 Red Hat. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PMDAMOUNTS 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pmdamounts\f1 \- filesystem mounts performance metrics domain agent (PMDA) ++.SH SYNOPSIS ++\f3$PCP_PMDAS_DIR/mounts/pmdamounts\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-U\f1 \f2username\f1] ++.SH DESCRIPTION ++.B pmdamounts ++is a simple Performance Metrics Domain Agent (PMDA) which ++monitors availability of a given set of filesystem mounts. ++.PP ++The ++.B mounts ++PMDA exports metrics that reflect whether the configured ++filesystems are mounted ("up") or not. ++The list of mount points to monitor is specified via the ++.I $PCP_PMDAS_DIR/mounts/mounts.conf ++file which simply contains one line for each mount point. ++.PP ++Note that the platform kernel PMDA exports a more extensive ++set of filesystem metrics for every mounted filesystem \- ++this PMDA is primarily intended for availability monitoring ++using the ++.I mounts.up ++metric. ++.PP ++A brief description of the ++.B pmdamounts ++command line options follows: ++.TP 5 ++.B \-d ++It is absolutely crucial that the performance metrics ++.I domain ++number specified here is unique and consistent. ++That is, ++.I domain ++should be different for every PMDA on the one host, and the same ++.I domain ++number should be used for the same PMDA on all hosts. ++.TP ++.B \-l ++Location of the log file. By default, a log file named ++.I mounts.log ++is written in the current directory of ++.BR pmcd (1) ++when ++.B pmdamounts ++is started, i.e. ++.BR $PCP_LOG_DIR/pmcd . ++If the log file cannot ++be created or is not writable, output is written to the standard error instead. ++.TP ++.B \-U ++User account under which to run the agent. ++The default is the unprivileged "pcp" account in current versions of PCP, ++but in older versions the superuser account ("root") was used by default. ++.SH INSTALLATION ++If you want access to the names, help text and values for the mounts ++performance metrics, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/mounts ++# ./Install ++.in ++.fi ++.ft 1 ++.PP ++If you want to undo the installation, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/mounts ++# ./Remove ++.in ++.fi ++.ft 1 ++.PP ++.B pmdamounts ++is launched by ++.BR pmcd (1) ++and should never be executed directly. ++The Install and Remove scripts notify ++.BR pmcd (1) ++when the agent is installed or removed. ++.SH FILES ++.PD 0 ++.TP 10 ++.B $PCP_PMCDCONF_PATH ++command line options used to launch ++.B pmdamounts ++.TP 10 ++.B $PCP_PMDAS_DIR/mounts/help ++default help text file for the mounts metrics ++.TP 10 ++.B $PCP_PMDAS_DIR/mounts/Install ++installation script for the ++.B pmdamounts ++agent ++.TP 10 ++.B $PCP_PMDAS_DIR/mounts/Remove ++undo installation script for the ++.B pmdamounts ++agent ++.TP 10 ++.B $PCP_LOG_DIR/pmcd/mounts.log ++default log file for error messages and other information from ++.B pmdamounts ++.PD ++.SH "PCP ENVIRONMENT" ++Environment variables with the prefix ++.B PCP_ ++are used to parameterize the file and directory names ++used by PCP. ++On each installation, the file ++.I /etc/pcp.conf ++contains the local values for these variables. ++The ++.B $PCP_CONF ++variable may be used to specify an alternative ++configuration file, ++as described in ++.BR pcp.conf (5). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pmcd (1), ++.BR pcp.conf (5) ++and ++.BR pcp.env (5). +diff --git a/man/man1/pmdaproc.1 b/man/man1/pmdaproc.1 +new file mode 100644 +index 0000000..191f178 +--- /dev/null ++++ b/man/man1/pmdaproc.1 +@@ -0,0 +1,185 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2014 Red Hat. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PMDAPROC 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pmdaproc\f1 \- process performance metrics domain agent (PMDA) ++.SH SYNOPSIS ++\f3$PCP_PMDAS_DIR/proc/pmdaproc\f1 ++[\f3\-AL\f1] ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-r\f1 \f2cgroup\f1] ++[\f3\-U\f1 \f2username\f1] ++.SH DESCRIPTION ++.B pmdaproc ++is a Performance Metrics Domain Agent (PMDA) which extracts ++performance metrics describing the state of the individual ++processes running on a Linux system. ++.PP ++The ++.B proc ++PMDA exports metrics that measure the memory, processor and ++other resource use of each process, as well as summary information ++collated across all of the running processes. ++The PMDA uses credentials passed from the ++.BR PMAPI (3) ++monitoring tool identifying the user requesting the information, ++to ensure that only values the user is allowed to access are ++returned by the PMDA. ++This involves the PMDA temporarily changing its effective user and ++group identifiers for the duration of requests for instances and ++values. ++In other words, system calls to extract information are performed ++as the user originating the request and not as a privileged user. ++The mechanisms available for transfer of user credentials are ++described further in the ++.BR PCPIntro (1) ++page. ++.PP ++A brief description of the ++.B pmdaproc ++command line options follows: ++.TP 5 ++.B \-A ++Disables use of the credentials provided by ++.B PMAPI ++client tools, ++and simply runs everything under the "root" account. ++.TP ++.B \-L ++Changes the per-process instance domain used by most ++.B procproc ++metrics to include threads as well. ++.TP ++.B \-d ++It is absolutely crucial that the performance metrics ++.I domain ++number specified here is unique and consistent. ++That is, ++.I domain ++should be different for every PMDA on the one host, and the same ++.I domain ++number should be used for the same PMDA on all hosts. ++.TP ++.B \-l ++Location of the log file. By default, a log file named ++.I proc.log ++is written in the current directory of ++.BR pmcd (1) ++when ++.B pmdaproc ++is started, i.e. ++.BR $PCP_LOG_DIR/pmcd . ++If the log file cannot ++be created or is not writable, output is written to the standard error instead. ++.TP ++.B \-r ++Restrict the set of processes exported in the per-process instance domain ++to only those processes that are contained by the specified ++.IR cgroup ++resource container. ++This option provides an optional finer granularity to the monitoring, and ++can also be used to reduce the resources consumed by ++.I pmdaproc ++during requests for instances and values. ++.TP ++.B \-U ++User account under which to run the agent. ++The default is the privileged "root" account, with ++seteuid (2) ++and ++setegid (2) ++switching for accessing most information. ++.SH INSTALLATION ++The ++.B proc ++PMDA is installed and available by default. ++If you want to undo the installation, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/proc ++# ./Remove ++.in ++.fi ++.ft 1 ++.PP ++If you want to establish access to the names, help text and values for the proc ++performance metrics once more, after removal, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/proc ++# ./Install ++.in ++.fi ++.ft 1 ++.PP ++.B pmdaproc ++is launched by ++.BR pmcd (1) ++and should never be executed directly. ++The Install and Remove scripts notify ++.BR pmcd (1) ++when the agent is installed or removed. ++.SH FILES ++.PD 0 ++.TP 10 ++.B $PCP_PMCDCONF_PATH ++command line options used to launch ++.B pmdaproc ++.TP 10 ++.B $PCP_PMDAS_DIR/proc/help ++default help text file for the proc metrics ++.TP 10 ++.B $PCP_PMDAS_DIR/proc/Install ++installation script for the ++.B pmdaproc ++agent ++.TP 10 ++.B $PCP_PMDAS_DIR/proc/Remove ++undo installation script for the ++.B pmdaproc ++agent ++.TP 10 ++.B $PCP_LOG_DIR/pmcd/proc.log ++default log file for error messages and other information from ++.B pmdaproc ++.PD ++.SH "PCP ENVIRONMENT" ++Environment variables with the prefix ++.B PCP_ ++are used to parameterize the file and directory names ++used by PCP. ++On each installation, the file ++.I /etc/pcp.conf ++contains the local values for these variables. ++The ++.B $PCP_CONF ++variable may be used to specify an alternative ++configuration file, ++as described in ++.BR pcp.conf (5). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pmcd (1), ++.BR seteuid (2), ++.BR setegid (2), ++.BR PMAPI (3), ++.BR pcp.conf (5) ++and ++.BR pcp.env (5). +diff --git a/man/man1/pmdaroomtemp.1 b/man/man1/pmdaroomtemp.1 +new file mode 100644 +index 0000000..468c66e +--- /dev/null ++++ b/man/man1/pmdaroomtemp.1 +@@ -0,0 +1,136 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2014 Red Hat. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PMDAROOMTEMP 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pmdaroomtemp\f1 \- room temperature performance metrics domain agent (PMDA) ++.SH SYNOPSIS ++\f3$PCP_PMDAS_DIR/roomtemp/pmdaroomtemp\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++.SH DESCRIPTION ++.B pmdaroomtemp ++is a Performance Metrics Domain Agent (PMDA) which exports the ++temperature from one or more sensors built using the DS2480 and ++DS1280 chipsets and MicroLAN technology from Dallas Semiconductor ++Corporation. ++.PP ++The ++.B roomtemp ++PMDA exports metrics that reflect the temperatures from one or ++more of these devices, in both degrees Celcius and Fahrenheit. ++Each metric has one instance for each temperature sensor device. ++The external instance identifiers are the serial numbers (in hex) ++of the DS1280 chips discovered when the MicroLAN was probed. ++.PP ++A brief description of the ++.B pmdaroomtemp ++command line options follows: ++.TP 5 ++.B \-d ++It is absolutely crucial that the performance metrics ++.I domain ++number specified here is unique and consistent. ++That is, ++.I domain ++should be different for every PMDA on the one host, and the same ++.I domain ++number should be used for the same PMDA on all hosts. ++.TP ++.B \-l ++Location of the log file. By default, a log file named ++.I roomtemp.log ++is written in the current directory of ++.BR pmcd (1) ++when ++.B pmdaroomtemp ++is started, i.e. ++.BR $PCP_LOG_DIR/pmcd . ++If the log file cannot ++be created or is not writable, output is written to the standard error instead. ++.SH INSTALLATION ++If you want access to the names, help text and values for the roomtemp ++performance metrics, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/roomtemp ++# ./Install ++.in ++.fi ++.ft 1 ++.PP ++If you want to undo the installation, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/roomtemp ++# ./Remove ++.in ++.fi ++.ft 1 ++.PP ++.B pmdaroomtemp ++is launched by ++.BR pmcd (1) ++and should never be executed directly. ++The Install and Remove scripts notify ++.BR pmcd (1) ++when the agent is installed or removed. ++.SH FILES ++.PD 0 ++.TP 10 ++.B $PCP_PMCDCONF_PATH ++command line options used to launch ++.B pmdaroomtemp ++.TP 10 ++.B $PCP_PMDAS_DIR/roomtemp/help ++default help text file for the roomtemp metrics ++.TP 10 ++.B $PCP_PMDAS_DIR/roomtemp/Install ++installation script for the ++.B pmdaroomtemp ++agent ++.TP 10 ++.B $PCP_PMDAS_DIR/roomtemp/Remove ++undo installation script for the ++.B pmdaroomtemp ++agent ++.TP 10 ++.B $PCP_LOG_DIR/pmcd/roomtemp.log ++default log file for error messages and other information from ++.B pmdaroomtemp ++.PD ++.SH "PCP ENVIRONMENT" ++Environment variables with the prefix ++.B PCP_ ++are used to parameterize the file and directory names ++used by PCP. ++On each installation, the file ++.I /etc/pcp.conf ++contains the local values for these variables. ++The ++.B $PCP_CONF ++variable may be used to specify an alternative ++configuration file, ++as described in ++.BR pcp.conf (5). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pmcd (1), ++.BR pcp.conf (5) ++and ++.BR pcp.env (5). +diff --git a/man/man1/pmdarpm.1 b/man/man1/pmdarpm.1 +new file mode 100644 +index 0000000..48a02b5 +--- /dev/null ++++ b/man/man1/pmdarpm.1 +@@ -0,0 +1,151 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2014 Red Hat. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PMDARPM 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pmdarpm\f1 \- RPM packages performance metrics domain agent (PMDA) ++.SH SYNOPSIS ++\f3$PCP_PMDAS_DIR/rpm/pmdarpm\f1 ++[\f3\-C\f1] ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-r\f1 \f2path\f1] ++[\f3\-U\f1 \f2username\f1] ++.SH DESCRIPTION ++.B pmdarpm ++is a Performance Metrics Domain Agent (PMDA) which extracts ++performance metrics reflecting the state of the RPM package ++database managed by ++.BR rpm (1). ++.PP ++The ++.B rpm ++PMDA exports metrics that describe each package installed on a ++system, as well as some cumulative totals. ++When the RPM database changes the PMDA automatically detects this ++and uses a background thread to asynchronously refresh its values. ++.PP ++A brief description of the ++.B pmdarpm ++command line options follows: ++.TP 5 ++.B \-C ++Verify the package iteration code by scanning the RPM database ++once, then exiting. ++Only useful for problem diagnosis and testing. ++.TP ++.B \-d ++It is absolutely crucial that the performance metrics ++.I domain ++number specified here is unique and consistent. ++That is, ++.I domain ++should be different for every PMDA on the one host, and the same ++.I domain ++number should be used for the same PMDA on all hosts. ++.TP ++.B \-l ++Location of the log file. By default, a log file named ++.I rpm.log ++is written in the current directory of ++.BR pmcd (1) ++when ++.B pmdarpm ++is started, i.e. ++.BR $PCP_LOG_DIR/pmcd . ++If the log file cannot ++be created or is not writable, output is written to the standard error instead. ++.TP ++.B \-r ++Specify an alternate path to the RPM database (default is ++.IR /var/lib/rpm/Packages ). ++.TP ++.B \-U ++User account under which to run the agent. ++The default is the unprivileged "pcp" account. ++.SH INSTALLATION ++If you want access to the names, help text and values for the rpm ++performance metrics, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/rpm ++# ./Install ++.in ++.fi ++.ft 1 ++.PP ++If you want to undo the installation, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/rpm ++# ./Remove ++.in ++.fi ++.ft 1 ++.PP ++.B pmdarpm ++is launched by ++.BR pmcd (1) ++and should never be executed directly. ++The Install and Remove scripts notify ++.BR pmcd (1) ++when the agent is installed or removed. ++.SH FILES ++.PD 0 ++.TP 10 ++.B $PCP_PMCDCONF_PATH ++command line options used to launch ++.B pmdarpm ++.TP 10 ++.B $PCP_PMDAS_DIR/rpm/help ++default help text file for the rpm metrics ++.TP 10 ++.B $PCP_PMDAS_DIR/rpm/Install ++installation script for the ++.B pmdarpm ++agent ++.TP 10 ++.B $PCP_PMDAS_DIR/rpm/Remove ++undo installation script for the ++.B pmdarpm ++agent ++.TP 10 ++.B $PCP_LOG_DIR/pmcd/rpm.log ++default log file for error messages and other information from ++.B pmdarpm ++.PD ++.SH "PCP ENVIRONMENT" ++Environment variables with the prefix ++.B PCP_ ++are used to parameterize the file and directory names ++used by PCP. ++On each installation, the file ++.I /etc/pcp.conf ++contains the local values for these variables. ++The ++.B $PCP_CONF ++variable may be used to specify an alternative ++configuration file, ++as described in ++.BR pcp.conf (5). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pmcd (1), ++.BR pcp.conf (5) ++and ++.BR pcp.env (5). +diff --git a/man/man1/pmdasystemd.1 b/man/man1/pmdasystemd.1 +new file mode 100644 +index 0000000..b4fd3bd +--- /dev/null ++++ b/man/man1/pmdasystemd.1 +@@ -0,0 +1,176 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2014 Red Hat. ++.\" Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PMDASYSTEMD 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pmdasystemd\f1 \- systemd performance metrics domain agent (PMDA) ++.SH SYNOPSIS ++\f3$PCP_PMDAS_DIR/systemd/pmdasystemd\f1 ++[\f3\-f\f1] ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++[\f3\-m\f1 \f2memory\f1] ++[\f3\-s\f1 \f2interval\f1] ++[\f3\-U\f1 \f2username\f1] ++.SH DESCRIPTION ++.B pmdasystemd ++is a systemd log file monitoring Performance Metrics Domain ++Agent (PMDA). ++It can be seen as analagous to the ++.B \-f ++option to ++.BR journalctl (1) ++and converts each new log line into a performance event, ++suitable for consumption by ++.BR PMAPI (3) ++client tools like ++.BR pmevent (1). ++.PP ++The ++.B systemd ++PMDA exports both event-style metrics reflecting timestamped event ++records for messages logged to the system logs, as well as the more ++orthodox sample-style metrics such as message counts and throughput ++size values. ++.PP ++A brief description of the ++.B pmdasystemd ++command line options follows: ++.TP 5 ++.B \-d ++It is absolutely crucial that the performance metrics ++.I domain ++number specified here is unique and consistent. ++That is, ++.I domain ++should be different for every PMDA on the one host, and the same ++.I domain ++number should be used for the same PMDA on all hosts. ++.TP ++.B \-f ++Disables per-uid/gid record filtering. ++By default the user and group credentials will be used to ++filter log records returned to the client tool, preventing ++information exposure to arbitrary users. ++This option disables that, so use only with extreme caution. ++.TP ++.B \-l ++Location of the log file. By default, a log file named ++.I systemd.log ++is written in the current directory of ++.BR pmcd (1) ++when ++.B pmdasystemd ++is started, i.e. ++.BR $PCP_LOG_DIR/pmcd . ++If the log file cannot ++be created or is not writable, output is written to the standard error instead. ++.TP ++.B \-m ++Limit the physical memory used by the PMDA to buffer event records to ++.I maxsize ++bytes. ++As log events arrive at the PMDA, they must be buffered until individual ++client tools request the next batch since their previous batch of events. ++The default maximum is 2 megabytes. ++.TP ++.B \-s ++Sets the polling interval for detecting newly arrived log lines. ++Mirrors the same option from the ++.BR tail (1) ++command. ++.TP ++.B \-U ++User account under which to run the agent. ++The default is the "adm" user account. ++.SH INSTALLATION ++If you want access to the names, help text and values for the systemd ++performance metrics, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/systemd ++# ./Install ++.in ++.fi ++.ft 1 ++.PP ++If you want to undo the installation, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/systemd ++# ./Remove ++.in ++.fi ++.ft 1 ++.PP ++.B pmdasystemd ++is launched by ++.BR pmcd (1) ++and should never be executed directly. ++The Install and Remove scripts notify ++.BR pmcd (1) ++when the agent is installed or removed. ++.SH FILES ++.PD 0 ++.TP 10 ++.B $PCP_PMCDCONF_PATH ++command line options used to launch ++.B pmdasystemd ++.TP 10 ++.B $PCP_PMDAS_DIR/systemd/help ++default help text file for the systemd metrics ++.TP 10 ++.B $PCP_PMDAS_DIR/systemd/Install ++installation script for the ++.B pmdasystemd ++agent ++.TP 10 ++.B $PCP_PMDAS_DIR/systemd/Remove ++undo installation script for the ++.B pmdasystemd ++agent ++.TP 10 ++.B $PCP_LOG_DIR/pmcd/systemd.log ++default log file for error messages and other information from ++.B pmdasystemd ++.PD ++.SH "PCP ENVIRONMENT" ++Environment variables with the prefix ++.B PCP_ ++are used to parameterize the file and directory names ++used by PCP. ++On each installation, the file ++.I /etc/pcp.conf ++contains the local values for these variables. ++The ++.B $PCP_CONF ++variable may be used to specify an alternative ++configuration file, ++as described in ++.BR pcp.conf (5). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pmcd (1), ++.BR pmevent (1), ++.BR journalctl (1), ++.BR tail (1), ++.BR PMAPI (3), ++.BR pcp.conf (5) ++and ++.BR pcp.env (5). +diff --git a/man/man1/pmdaxfs.1 b/man/man1/pmdaxfs.1 +new file mode 100644 +index 0000000..23a3276 +--- /dev/null ++++ b/man/man1/pmdaxfs.1 +@@ -0,0 +1,143 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2014 Red Hat. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PMDAXFS 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pmdaxfs\f1 \- XFS filesystem performance metrics domain agent (PMDA) ++.SH SYNOPSIS ++\f3$PCP_PMDAS_DIR/xfs/pmdaxfs\f1 ++[\f3\-d\f1 \f2domain\f1] ++[\f3\-l\f1 \f2logfile\f1] ++.SH DESCRIPTION ++.B pmdaxfs ++is a Performance Metrics Domain Agent (PMDA) which extracts ++performance metrics describing the state of the XFS filesystem ++from the Linux kernel. ++.PP ++The ++.B xfs ++PMDA exports metrics that measure information about metadata buffer ++usage, the journal, btree operations, inode operations, extended ++attributes, directories, quotas, read and write operation counts ++and of course throughput. ++.PP ++The PMDA provides a facility to reset the values of all counters ++to zero using ++.BR pmstore (1) ++with the xfs.control.reset metric. ++.PP ++A brief description of the ++.B pmdaxfs ++command line options follows: ++.TP 5 ++.B \-d ++It is absolutely crucial that the performance metrics ++.I domain ++number specified here is unique and consistent. ++That is, ++.I domain ++should be different for every PMDA on the one host, and the same ++.I domain ++number should be used for the same PMDA on all hosts. ++.TP ++.B \-l ++Location of the log file. By default, a log file named ++.I xfs.log ++is written in the current directory of ++.BR pmcd (1) ++when ++.B pmdaxfs ++is started, i.e. ++.BR $PCP_LOG_DIR/pmcd . ++If the log file cannot ++be created or is not writable, output is written to the standard error instead. ++.SH INSTALLATION ++The ++.B xfs ++PMDA is installed and available by default on Linux. ++If you want to undo the installation, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/xfs ++# ./Remove ++.in ++.fi ++.ft 1 ++.PP ++If you want to establish access to the names, help text and values for the XFS ++performance metrics once more, after removal, do the following as root: ++.PP ++.ft CW ++.nf ++.in +0.5i ++# cd $PCP_PMDAS_DIR/xfs ++# ./Install ++.in ++.fi ++.ft 1 ++.PP ++.B pmdaxfs ++is launched by ++.BR pmcd (1) ++and should never be executed directly. ++The Install and Remove scripts notify ++.BR pmcd (1) ++when the agent is installed or removed. ++.SH FILES ++.PD 0 ++.TP 10 ++.B $PCP_PMCDCONF_PATH ++command line options used to launch ++.B pmdaxfs ++.TP 10 ++.B $PCP_PMDAS_DIR/xfs/help ++default help text file for the xfs metrics ++.TP 10 ++.B $PCP_PMDAS_DIR/xfs/Install ++installation script for the ++.B pmdaxfs ++agent ++.TP 10 ++.B $PCP_PMDAS_DIR/xfs/Remove ++undo installation script for the ++.B pmdaxfs ++agent ++.TP 10 ++.B $PCP_LOG_DIR/pmcd/xfs.log ++default log file for error messages and other information from ++.B pmdaxfs ++.PD ++.SH "PCP ENVIRONMENT" ++Environment variables with the prefix ++.B PCP_ ++are used to parameterize the file and directory names ++used by PCP. ++On each installation, the file ++.I /etc/pcp.conf ++contains the local values for these variables. ++The ++.B $PCP_CONF ++variable may be used to specify an alternative ++configuration file, ++as described in ++.BR pcp.conf (5). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pmcd (1), ++.BR pmstore (1), ++.BR pcp.conf (5) ++and ++.BR pcp.env (5). +commit e8593e28c773218a2521db3f201b371c78bcaff6 +Author: Nathan Scott +Date: Wed Jan 29 13:51:18 2014 +1100 + + Resolve build failure in man pages, overriding LSRCFILES incorrectly + +diff --git a/man/man1/GNUmakefile b/man/man1/GNUmakefile +index 96da981..ae5857c 100644 +--- a/man/man1/GNUmakefile ++++ b/man/man1/GNUmakefile +@@ -51,36 +51,36 @@ WEBD_PAGES = pmwebd.1 + ifeq "$(TARGET_OS)" "linux" + MAN_PAGES += $(LINUX_PMDA_PAGES) + else +-LSRCFILES += $(LINUX_PMDA_PAGES) ++OTHER_PAGES += $(LINUX_PMDA_PAGES) + endif + ifneq "$(findstring $(TARGET_OS),solaris linux)" "" + MAN_PAGES += $(ROOMTEMP_PMDA_PAGES) + else +-LSRCFILES += $(ROOMTEMP_PMDA_PAGES) ++OTHER_PAGES += $(ROOMTEMP_PMDA_PAGES) + endif + ifeq "$(HAVE_RPMLIB)" "1" + MAN_PAGES += $(RPM_PMDA_PAGES) + else +-LSRCFILES += $(RPM_PMDA_PAGES) ++OTHER_PAGES += $(RPM_PMDA_PAGES) + endif + ifneq "$(PMDA_SYSTEMD)" "" + MAN_PAGES += $(SYSTEMD_PMDA_PAGES) + else +-LSRCFILES += $(SYSTEMD_PMDA_PAGES) ++OTHER_PAGES += $(SYSTEMD_PMDA_PAGES) + endif + ifneq "$(PMDA_INFINIBAND)" "" + MAN_PAGES += $(IB_PMDA_PAGES) + else +-LSRCFILES += $(IB_PMDA_PAGES) ++OTHER_PAGES += $(IB_PMDA_PAGES) + endif + ifeq "$(HAVE_LIBMICROHTTPD)" "1" + MAN_PAGES += $(WEBD_PAGES) + else +-LSRCFILES += $(WEBD_PAGES) ++OTHER_PAGES += $(WEBD_PAGES) + endif + + MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTION) +-LSRCFILES = $(MAN_PAGES) ++LSRCFILES = $(MAN_PAGES) $(OTHER_PAGES) + + default :: default_pcp + +commit b3bdc8db5fd1b9ae4eae7339e936c8fa56a4879d +Author: Nathan Scott +Date: Mon Feb 10 13:56:31 2014 +1100 + + Fix errors on the recently added kernel PMDAs man page + + There is a separate pmdaproc man page, so listing that here + gives warnings ("file listed twice") during packaging phase. + Also, "kernel PMDA" is too generic a term to use in the NAME + section as 'apropos kernel' then hits on this man page - fix + that as well. + +diff --git a/man/man1/pmdakernel.1 b/man/man1/pmdakernel.1 +index b8d5203..6d9b7bf 100644 +--- a/man/man1/pmdakernel.1 ++++ b/man/man1/pmdakernel.1 +@@ -19,10 +19,8 @@ + \f3pmdafreebsd\f1, + \f3pmdalinux\f1, + \f3pmdanetbsd\f1, +-\f3pmdaproc\f1, + \f3pmdasolaris\f1, +-\f3pmdawindows\f1, +-\f3kernel PMDAs\f1 \- operating system kernel performance metrics domain agents ++\f3pmdawindows\f1 \- operating system kernel performance metrics domain agents + .SH SYNOPSIS + \f3$PCP_PMDAS_DIR/aix/pmdaaix\f1 + [\f3\-d\f1 \f2domain\f1] diff --git a/SOURCES/bz1055826.patch b/SOURCES/bz1055826.patch new file mode 100644 index 0000000..f0f22ae --- /dev/null +++ b/SOURCES/bz1055826.patch @@ -0,0 +1,168 @@ +commit 91136b3b6c9338d506c217e21b7c4a34c0af8671 +Author: Frank Ch. Eigler +Date: Mon Jan 20 21:43:40 2014 -0500 + + RHBZ1055818: correct SEGV in pmda/linux for overlarge icmpmsg type + + On linux, /proc/net/snmp | grep IcmpMsg normally contains a few + ordinal-indexed counters, whose indexes can be larger than than the + pcp pmda likes. This could lead to SEGVs or mild memory corruption. + + The new code adds an explicit limit check, and bumps up the limits + to 256 (related to the kernel __ICMPMSG_MIB_MAX) than the misused + SNMP_PERLINE (which only limits how many different message type + counters may be listed on the same line - not their ordinal values). + +diff --git a/src/pmdas/linux/proc_net_snmp.c b/src/pmdas/linux/proc_net_snmp.c +index 80be988..87ab6fa 100644 +--- a/src/pmdas/linux/proc_net_snmp.c ++++ b/src/pmdas/linux/proc_net_snmp.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013 Red Hat. ++ * Copyright (c) 2013-2014 Red Hat. + * Copyright (c) 2000,2004 Silicon Graphics, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it +@@ -249,7 +249,8 @@ get_fields(snmp_fields_t *fields, char *header, char *buffer) + } + + static void +-get_ordinal_fields(snmp_fields_t *fields, char *header, char *buffer) ++get_ordinal_fields(snmp_fields_t *fields, char *header, char *buffer, ++ unsigned limit) + { + int i, j, count; + unsigned int inst; +@@ -270,6 +271,8 @@ get_ordinal_fields(snmp_fields_t *fields, char *header, char *buffer) + for (i = 0; fields[i].field; i++) { + if (sscanf(indices[j], fields[i].field, &inst) != 1) + continue; ++ if (inst >= limit) ++ continue; + *(fields[i].offset + inst) = strtoull(p, NULL, 10); + break; + } +@@ -314,7 +317,7 @@ init_refresh_proc_net_snmp(proc_net_snmp_t *snmp) + /* only need to allocate and setup the names once */ + if (proc_net_snmp_icmpmsg_names) + return; +- i = SNMP_PERLINE * SNMP_MAX_ICMPMSG_TYPESTR; ++ i = NR_ICMPMSG_COUNTERS * SNMP_MAX_ICMPMSG_TYPESTR; + proc_net_snmp_icmpmsg_names = malloc(i); + if (!proc_net_snmp_icmpmsg_names) + return; +@@ -326,7 +329,7 @@ init_refresh_proc_net_snmp(proc_net_snmp_t *snmp) + s += SNMP_MAX_ICMPMSG_TYPESTR; + } + idp = PMDAINDOM(ICMPMSG_INDOM); +- idp->it_numinst = SNMP_PERLINE; ++ idp->it_numinst = NR_ICMPMSG_COUNTERS; + idp->it_set = _pm_proc_net_snmp_indom_id; + } + +@@ -347,7 +350,8 @@ refresh_proc_net_snmp(proc_net_snmp_t *snmp) + else if (strncmp(values, "Icmp:", 5) == 0) + get_fields(icmp_fields, header, values); + else if (strncmp(values, "IcmpMsg:", 8) == 0) +- get_ordinal_fields(icmpmsg_fields, header, values); ++ get_ordinal_fields(icmpmsg_fields, header, values, ++ NR_ICMPMSG_COUNTERS); + else if (strncmp(values, "Tcp:", 4) == 0) + get_fields(tcp_fields, header, values); + else if (strncmp(values, "Udp:", 4) == 0) +diff --git a/src/pmdas/linux/proc_net_snmp.h b/src/pmdas/linux/proc_net_snmp.h +index 27e9a68..eeeb2a6 100644 +--- a/src/pmdas/linux/proc_net_snmp.h ++++ b/src/pmdas/linux/proc_net_snmp.h +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2013 Red Hat. ++ * Copyright (c) 2013-2014 Red Hat. + * Copyright (c) 2000,2004 Silicon Graphics, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it +@@ -16,7 +16,7 @@ + #define SNMP_MAX_COLUMNS 64 /* arbitrary upper bound */ + #define SNMP_PERLINE 16 /* see net/ipv4/proc.c */ + #define SNMP_MAX_ICMPMSG_TYPESTR 8 /* longest name for type */ +-#define NR_ICMPMSG_COUNTERS SNMP_PERLINE ++#define NR_ICMPMSG_COUNTERS 256 /* half of __ICMPMSG_MIB_MAX from kernel */ + + enum { + _PM_SNMP_IP_FORWARDING = 0, + +commit 86590fd0132a6a0103f0de58c9fb8e47b3532f49 +Author: Nathan Scott +Date: Wed Jan 22 15:08:41 2014 +1100 + + Add test 844 exercising the unexpected-ICMP-packet-type pmdalinux fix + +diff --git a/qa/844 b/qa/844 +new file mode 100755 +index 0000000..d033913 +--- /dev/null ++++ b/qa/844 +@@ -0,0 +1,41 @@ ++#!/bin/sh ++# PCP QA Test No. 844 ++# Exercise fix for Fedora bugzilla #1055818 - ++# pmdalinux segv on unexpected ICMP type field values ++# ++# Copyright (c) 2014 Red Hat. ++# ++ ++seq=`basename $0` ++echo "QA output created by $seq" ++ ++# get standard environment, filters and checks ++. ./common.product ++. ./common.filter ++. ./common.check ++ ++which nmap >/dev/null 2>&1 || _notrun "nmap package not installed" ++which nping >/dev/null 2>&1 || _notrun "nping binary not installed" ++ ++status=1 # failure is the default! ++$sudo rm -rf $tmp.* $seq.full ++trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15 ++ ++_filter_icmp_metrics() ++{ ++ sed \ ++ -e "/network\..*\.incsumerrors: $unavailable/d" \ ++ # end filter ++} ++ ++# real QA test starts here ++$sudo nping --icmp --icmp-type 142 --quiet --count 1 localhost >$tmp.out 2>$tmp.err ++status=$? ++echo "nping status=$status" ++cat $tmp.out $tmp.err ++ ++# verify we get good data (2x fetch for segv) ++pminfo -v network.icmp 2>&1 | _filter_icmp_metrics ++pminfo -v network.icmp 2>&1 | _filter_icmp_metrics ++ ++exit +diff --git a/qa/844.out b/qa/844.out +new file mode 100755 +index 0000000..a3f741c +--- /dev/null ++++ b/qa/844.out +@@ -0,0 +1,3 @@ ++QA output created by 844 ++nping status=0 ++Warning: Specified ICMP type (142) is not RFC compliant. +diff --git a/qa/group b/qa/group +index a5fd816..45390c1 100644 +--- a/qa/group ++++ b/qa/group +@@ -894,6 +894,7 @@ avahi + 831 pmda.sample pmstore secure local oss + 832 pmda.sample pmstore secure local oss + 840 avahi local oss ++844 pmda.linux local oss + 861 pmcd pmda.pmcd local oss + 875 libpcp local oss + 876 pmda.xfs local oss diff --git a/SOURCES/bz1059004.patch b/SOURCES/bz1059004.patch new file mode 100644 index 0000000..f114aec --- /dev/null +++ b/SOURCES/bz1059004.patch @@ -0,0 +1,26 @@ +commit 80601bca1cd8c43e4860d4a290c9dbdfe08e49b6 +Author: Nathan Scott +Date: Wed Jan 29 09:40:57 2014 +1100 + + Fix build regression from recent NeedRebuild makefile changes + + Conditional code added to pmns makefile has incorrectly caught + the $(STDPMID) macro in its evil clutches. This causes failure + on new installations (no problems for upgrades though) as two + important namespace files are missing from the package. + +diff --git a/src/pmns/GNUmakefile b/src/pmns/GNUmakefile +index b2fb5c8..32ebe34 100644 +--- a/src/pmns/GNUmakefile ++++ b/src/pmns/GNUmakefile +@@ -62,8 +62,9 @@ install: default + $(INSTALL) -m 644 GNUmakefile.install $(PMNS_VAR_DIR)/Makefile + $(INSTALL) -m 755 Rebuild $(PMNS_VAR_DIR)/Rebuild + $(INSTALL) -m 755 Make.stdpmid $(PMNS_VAR_DIR)/Make.stdpmid ++ $(INSTALL) -m 644 $(STDPMID) $(PMNS_VAR_DIR) + ifeq (, $(filter redhat debian, $(PACKAGE_DISTRIBUTION))) +- $(INSTALL) -m 644 .NeedRebuild $(STDPMID) $(PMNS_VAR_DIR) ++ $(INSTALL) -m 644 .NeedRebuild $(PMNS_VAR_DIR)/.NeedRebuild + endif + + stdpmid: $(STDPMID) diff --git a/SOURCES/bz1059642.patch b/SOURCES/bz1059642.patch new file mode 100644 index 0000000..2753831 --- /dev/null +++ b/SOURCES/bz1059642.patch @@ -0,0 +1,1124 @@ +commit 56ebe5fde238569be2c8b5b4babc9430eedb3616 +Author: Nathan Scott +Date: Tue Feb 11 10:48:14 2014 +1100 + + Changes to pmdasample to support multlib devel packages + + This removes architecture-dependent files in the development + package related to pmdasample. Instead of installing prebuilt + binaries, we now use the pmdasimple/pmdatrivial technique of + installing a makefile and generating them. + + There's a bit of code tweaking in terms of header includes and + domain number file generation, making pmdasample code match up + more closely now with the other devel PMDAs. + +diff --git a/qa/156 b/qa/156 +index 4b2347a..319b2cc 100755 +--- a/qa/156 ++++ b/qa/156 +@@ -17,8 +17,11 @@ rm -f $seq.out + if [ $PCP_VER -lt 3600 ] + then + ln $seq.out.1 $seq.out || exit 1 +-else ++elif [ $PCP_VER -lt 3810 ] ++then + ln $seq.out.2 $seq.out || exit 1 ++else ++ ln $seq.out.3 $seq.out || exit 1 + fi + + $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start +diff --git a/qa/156.out.3 b/qa/156.out.3 +new file mode 100644 +index 0000000..f5c0d86 +--- /dev/null ++++ b/qa/156.out.3 +@@ -0,0 +1,329 @@ ++QA output created by 156 ++Waiting for pmcd to terminate ... ++Starting pmcd ... ++Starting pmlogger ... ++ ++=== remove agent === ++Culling the Performance Metrics Name Space ... ++sample ... done ++Updating the PMCD control file, and notifying PMCD ... ++Removing files ... ++Check sample metrics have gone away ... OK ++Culling the Performance Metrics Name Space ... ++sampledso ... done ++Updating the PMCD control file, and notifying PMCD ... ++Removing files ... ++Check sampledso metrics have gone away ... OK ++Error: sample: Unknown metric name ++ ++=== pipe agent === ++You will need to choose an appropriate configuration for installation of ++the "sample" 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] both ++====================== ++= sample daemon PMDA = ++====================== ++PMCD should communicate with the sample daemon via a pipe or a socket? [pipe] pipe ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sample metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values ++====================== ++= sampledso DSO PMDA = ++====================== ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sampledso metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values ++sample.darkness: No value(s) available ++sample.noinst: No value(s) available ++sample.needprofile: Explicit instance identifier(s) required ++sample.bad.unknown: pmLookupDesc: Unknown or illegal metric identifier ++sample.bad.nosupport: Not Supported ++sample.event.type: No value(s) available ++sample.event.param_32: No value(s) available ++sample.event.param_u32: No value(s) available ++sample.event.param_64: No value(s) available ++sample.event.param_u64: No value(s) available ++sample.event.param_float: No value(s) available ++sample.event.param_double: No value(s) available ++sample.event.param_string: No value(s) available ++sample.event.param_aggregate: No value(s) available ++You will need to choose an appropriate configuration for installation of ++the "sample" 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] both ++====================== ++= sample daemon PMDA = ++====================== ++PMCD should communicate with the sample daemon via a pipe or a socket? [pipe] pipe ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sample metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values ++====================== ++= sampledso DSO PMDA = ++====================== ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sampledso metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values ++sample.darkness: No value(s) available ++sample.noinst: No value(s) available ++sample.needprofile: Explicit instance identifier(s) required ++sample.bad.unknown: pmLookupDesc: Unknown or illegal metric identifier ++sample.bad.nosupport: Not Supported ++sample.event.type: No value(s) available ++sample.event.param_32: No value(s) available ++sample.event.param_u32: No value(s) available ++sample.event.param_64: No value(s) available ++sample.event.param_u64: No value(s) available ++sample.event.param_float: No value(s) available ++sample.event.param_double: No value(s) available ++sample.event.param_string: No value(s) available ++sample.event.param_aggregate: No value(s) available ++ ++=== socket Internet agent === ++You will need to choose an appropriate configuration for installation of ++the "sample" 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] both ++====================== ++= sample daemon PMDA = ++====================== ++PMCD should communicate with the sample daemon via a pipe or a socket? [pipe] socket ++Use Internet, IPv6 or Unix domain sockets? [Internet] Internet ++Internet port number or service name? [2077] PORT1 ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sample metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values ++====================== ++= sampledso DSO PMDA = ++====================== ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sampledso metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values ++sample.darkness: No value(s) available ++sample.noinst: No value(s) available ++sample.needprofile: Explicit instance identifier(s) required ++sample.bad.unknown: pmLookupDesc: Unknown or illegal metric identifier ++sample.bad.nosupport: Not Supported ++sample.event.type: No value(s) available ++sample.event.param_32: No value(s) available ++sample.event.param_u32: No value(s) available ++sample.event.param_64: No value(s) available ++sample.event.param_u64: No value(s) available ++sample.event.param_float: No value(s) available ++sample.event.param_double: No value(s) available ++sample.event.param_string: No value(s) available ++sample.event.param_aggregate: No value(s) available ++You will need to choose an appropriate configuration for installation of ++the "sample" 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] both ++====================== ++= sample daemon PMDA = ++====================== ++PMCD should communicate with the sample daemon via a pipe or a socket? [pipe] socket ++Use Internet, IPv6 or Unix domain sockets? [Internet] Internet ++Internet port number or service name? [2077] PORT2 ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sample metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values ++====================== ++= sampledso DSO PMDA = ++====================== ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sampledso metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values ++sample.darkness: No value(s) available ++sample.noinst: No value(s) available ++sample.needprofile: Explicit instance identifier(s) required ++sample.bad.unknown: pmLookupDesc: Unknown or illegal metric identifier ++sample.bad.nosupport: Not Supported ++sample.event.type: No value(s) available ++sample.event.param_32: No value(s) available ++sample.event.param_u32: No value(s) available ++sample.event.param_64: No value(s) available ++sample.event.param_u64: No value(s) available ++sample.event.param_float: No value(s) available ++sample.event.param_double: No value(s) available ++sample.event.param_string: No value(s) available ++sample.event.param_aggregate: No value(s) available ++ ++=== socket Unix agent === ++You will need to choose an appropriate configuration for installation of ++the "sample" 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] both ++====================== ++= sample daemon PMDA = ++====================== ++PMCD should communicate with the sample daemon via a pipe or a socket? [pipe] socket ++Use Internet, IPv6 or Unix domain sockets? [Internet] Unix ++Unix FIFO name? TMP.fifo ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sample metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values ++====================== ++= sampledso DSO PMDA = ++====================== ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sampledso metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values ++sample.darkness: No value(s) available ++sample.noinst: No value(s) available ++sample.needprofile: Explicit instance identifier(s) required ++sample.bad.unknown: pmLookupDesc: Unknown or illegal metric identifier ++sample.bad.nosupport: Not Supported ++sample.event.type: No value(s) available ++sample.event.param_32: No value(s) available ++sample.event.param_u32: No value(s) available ++sample.event.param_64: No value(s) available ++sample.event.param_u64: No value(s) available ++sample.event.param_float: No value(s) available ++sample.event.param_double: No value(s) available ++sample.event.param_string: No value(s) available ++sample.event.param_aggregate: No value(s) available ++You will need to choose an appropriate configuration for installation of ++the "sample" 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] both ++====================== ++= sample daemon PMDA = ++====================== ++PMCD should communicate with the sample daemon via a pipe or a socket? [pipe] socket ++Use Internet, IPv6 or Unix domain sockets? [Internet] Unix ++Unix FIFO name? TMP.fifo ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sample metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values ++====================== ++= sampledso DSO PMDA = ++====================== ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sampledso metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values ++sample.darkness: No value(s) available ++sample.noinst: No value(s) available ++sample.needprofile: Explicit instance identifier(s) required ++sample.bad.unknown: pmLookupDesc: Unknown or illegal metric identifier ++sample.bad.nosupport: Not Supported ++sample.event.type: No value(s) available ++sample.event.param_32: No value(s) available ++sample.event.param_u32: No value(s) available ++sample.event.param_64: No value(s) available ++sample.event.param_u64: No value(s) available ++sample.event.param_float: No value(s) available ++sample.event.param_double: No value(s) available ++sample.event.param_string: No value(s) available ++sample.event.param_aggregate: No value(s) available ++Culling the Performance Metrics Name Space ... ++sample ... done ++Updating the PMCD control file, and notifying PMCD ... ++Removing files ... ++Check sample metrics have gone away ... OK ++Culling the Performance Metrics Name Space ... ++sampledso ... done ++Updating the PMCD control file, and notifying PMCD ... ++Removing files ... ++Check sampledso metrics have gone away ... OK ++Error: sample: Unknown metric name ++ ++Reinstall PMDA ... ++You will need to choose an appropriate configuration for installation of ++the "sample" 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] ====================== ++= sample daemon PMDA = ++====================== ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sample metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values ++====================== ++= sampledso DSO PMDA = ++====================== ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Check sampledso metrics have appeared ... 10+ warnings, 100+ metrics and 1200+ values +diff --git a/qa/642 b/qa/642 +index 4b36936..0242503 100755 +--- a/qa/642 ++++ b/qa/642 +@@ -14,7 +14,10 @@ echo "QA output created by $seq" + . ./common.check + + rm -f $seq.out $seq.full +-if [ $PCP_VER -ge 3801 ] ++if [ $PCP_VER -ge 3810 ] ++then ++ ln $seq.out.4 $seq.out || exit 1 ++elif [ $PCP_VER -ge 3801 ] + then + ln $seq.out.3 $seq.out || exit 1 + elif [ $PCP_VER -ge 3600 ] +diff --git a/qa/642.out.4 b/qa/642.out.4 +new file mode 100644 +index 0000000..c379768 +--- /dev/null ++++ b/qa/642.out.4 +@@ -0,0 +1,95 @@ ++QA output created by 642 ++ ++=== install #1 === ++You will need to choose an appropriate configuration for installation of ++the "trivial" 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] ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++ ++=== install #2 === ++You will need to choose an appropriate configuration for installation of ++the "simple" 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] ++Install simple as a daemon or python or perl or dso agent? [daemon] ++PMCD should communicate with the simple daemon via a pipe or a socket? [pipe] ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++ ++=== install #3 === ++You will need to choose an appropriate configuration for installation of ++the "sample" 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] ++====================== ++= sample daemon PMDA = ++====================== ++PMCD should communicate with the sample daemon via a pipe or a socket? [pipe] ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++====================== ++= sampledso DSO PMDA = ++====================== ++Installing files ... ++[...install files, make output...] ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++ ++=== install #4 === ++You will need to choose an appropriate configuration for installation of ++the "sendmail" 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) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++ ++=== install #5 === ++Installing the "trace" Performance Metrics Domain Agent (PMDA) ... ++ ++Use the default installation [y]? ++Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Note: some warnings are expected until trace API calls are made - refer to ++ the man pages for pmtrace(1) and pmdatrace(3) for further details. ++ ++=== PMNS differences (none expected) === ++ ++Waiting for pmcd to terminate ... ++Starting pmcd ... ++Starting pmlogger ... +diff --git a/src/pmdas/sample/GNUmakefile b/src/pmdas/sample/GNUmakefile +index 778042d..6650ac5 100644 +--- a/src/pmdas/sample/GNUmakefile ++++ b/src/pmdas/sample/GNUmakefile +@@ -1,39 +1,29 @@ + # ++# Copyright (c) 2014 Red Hat. All Rights Reserved. + # Copyright (c) 2000,2004 Silicon Graphics, Inc. All Rights Reserved. +-# ++# + # This program is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by the + # Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. +-# ++# + # This program is distributed in the hope that it will be useful, but + # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + # for more details. +-# +-# You should have received a copy of the GNU General Public License along +-# with this program; if not, write to the Free Software Foundation, Inc., +-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +-# +-#************************************************************************* +-# +-# Makefile - sample PMDA + # +-#************************************************************************* + + TOPDIR = ../../.. + include $(TOPDIR)/src/include/builddefs + +-DOMAIN = SAMPLE +- + DFILES = README help + LSRCFILES = root pmns $(DFILES) Install Remove Sample.pmchart +-LDIRT = domain.h *.dir *.pag sample.log ++LDIRT = *.dir *.pag + + SUBDIRS = src + PMDADIR = $(PCP_PMDAS_DIR)/sample + +-default_pcp default :: domain.h $(SUBDIRS) ++default_pcp default :: $(SUBDIRS) + + default_pcp default :: $(SUBDIRS) + $(SUBDIRS_MAKERULE) +@@ -44,13 +34,7 @@ install_pcp install :: $(SUBDIRS) + install_pcp install :: default + $(INSTALL) -d $(PMDADIR) + $(INSTALL) -m 755 Install Remove $(PMDADIR) +- $(INSTALL) -m 644 $(DFILES) pmns root domain.h $(PMDADIR) ++ $(INSTALL) -m 644 $(DFILES) pmns root $(PMDADIR) + $(INSTALL) -m 644 Sample.pmchart $(PCP_VAR_DIR)/config/pmchart/Sample + + include $(BUILDRULES) +- +-.NOTPARALLEL: +-.ORDER: domain.h $(OBJECTS) +- +-domain.h: ../../pmns/stdpmid +- $(DOMAIN_MAKERULE) +diff --git a/src/pmdas/sample/domain.h b/src/pmdas/sample/domain.h +new file mode 100644 +index 0000000..0aa641b +--- /dev/null ++++ b/src/pmdas/sample/domain.h +@@ -0,0 +1,4 @@ ++/* ++ * built from ../../pmns/stdpmid ++ */ ++#define SAMPLE 29 +diff --git a/src/pmdas/sample/src/GNUmakefile b/src/pmdas/sample/src/GNUmakefile +index 3a92c30..3070c68 100644 +--- a/src/pmdas/sample/src/GNUmakefile ++++ b/src/pmdas/sample/src/GNUmakefile +@@ -1,16 +1,17 @@ + # ++# Copyright (c) 2014 Red Hat. + # Copyright (c) 2000,2004 Silicon Graphics, Inc. All Rights Reserved. +-# ++# + # This program is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by the + # Free Software Foundation; either version 2 of the License, or (at your + # option) any later version. +-# ++# + # This program is distributed in the hope that it will be useful, but + # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + # for more details. +-# ++# + + TOPDIR = ../../../.. + include $(TOPDIR)/src/include/builddefs +@@ -20,6 +21,7 @@ include $(TOPDIR)/src/include/builddefs + # are building. + # + IAM = sample ++DOMAIN = SAMPLE + CMDTARGET = pmda$(IAM)$(EXECSUFFIX) + LIBTARGET = pmda_$(IAM).$(DSOSUFFIX) + TARGETS = $(CMDTARGET) $(LIBTARGET) +@@ -31,27 +33,27 @@ CFILES = pmda.c sample.c percontext.c events.c + HFILES = percontext.h events.h + VERSION_SCRIPT = exports + +-LDIRT = $(TARGETS) $(VERSION_SCRIPT) +- +-LCFLAGS = -DDYNAMIC_SPEC=\"$(PCP_PMDAS_DIR)/sample/dynamic.indom\" ++LDIRT = domain.h sample.log $(TARGETS) $(VERSION_SCRIPT) + LCFLAGS += $(INVISIBILITY) + LLDLIBS = $(PCP_PMDALIB) ++LSRCFILES = GNUmakefile.install + +-default: ../domain.h $(TARGETS) ++default: domain.h $(TARGETS) + + pmda.o sample.o percontext.o: percontext.h + sample.o events.o: events.h + pmda.o: $(VERSION_SCRIPT) + +-../domain.h: +- $(MAKE) -C .. domain.h ++domain.h: ../../../pmns/stdpmid ++ $(DOMAIN_MAKERULE) + + $(VERSION_SCRIPT): + $(VERSION_SCRIPT_MAKERULE) + + install: default + $(INSTALL) -m 755 -d $(PMDADIR) +- $(INSTALL) -m 755 $(CMDTARGET) $(LIBTARGET) $(PMDADIR) ++ $(INSTALL) -m 644 domain.h $(CFILES) $(HFILES) $(PMDADIR) ++ $(INSTALL) -m 644 GNUmakefile.install $(PMDADIR)/Makefile + + include $(BUILDRULES) + +diff --git a/src/pmdas/sample/src/GNUmakefile.install b/src/pmdas/sample/src/GNUmakefile.install +new file mode 100644 +index 0000000..a61aa7e +--- /dev/null ++++ b/src/pmdas/sample/src/GNUmakefile.install +@@ -0,0 +1,53 @@ ++# ++# Copyright (c) 2014 Red Hat. ++# Copyright (c) 2000,2003,2004 Silicon Graphics, Inc. All Rights Reserved. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++SHELL = sh ++ ++ifdef PCP_CONF ++include $(PCP_CONF) ++else ++include $(PCP_DIR)/etc/pcp.conf ++endif ++include $(PCP_INC_DIR)/builddefs ++ ++# remove -Lpath and -Ipath options from builddefs CFLAGS value ++# ++PCP_LIBS = ++TMP := $(CFLAGS:-I%=) ++ifdef PCP_DIR ++# put -Ipath and -Lpath back but use paths for run-time environment ++# ++CFLAGS = $(TMP) -I$(PCP_INC_DIR)/.. ++LDFLAGS = -L$(PCP_LIB_DIR) ++else ++CFLAGS = $(TMP) ++endif ++ ++IAM = sample ++CFILES = pmda.c sample.c percontext.c events.c ++HFILES = percontext.h events.h ++ ++LIBTARGET = pmda_$(IAM).$(DSOSUFFIX) ++CMDTARGET = pmda$(IAM) ++TARGETS = $(LIBTARGET) $(CMDTARGET) ++ ++LLDLIBS = -lpcp_pmda -lpcp -lm -ldl -lpthread ++LDIRT = *.log help.dir help.pag ++ ++default: $(TARGETS) ++ ++install: default ++ ++include $(PCP_INC_DIR)/buildrules +diff --git a/src/pmdas/sample/src/events.c b/src/pmdas/sample/src/events.c +index 31471a9..18b1803 100644 +--- a/src/pmdas/sample/src/events.c ++++ b/src/pmdas/sample/src/events.c +@@ -15,9 +15,9 @@ + * for more details. + */ + +-#include "pmapi.h" +-#include "impl.h" +-#include "pmda.h" ++#include ++#include ++#include + #include "events.h" + + static int nfetch; +diff --git a/src/pmdas/sample/src/percontext.c b/src/pmdas/sample/src/percontext.c +index 77026b8..0c549df 100644 +--- a/src/pmdas/sample/src/percontext.c ++++ b/src/pmdas/sample/src/percontext.c +@@ -15,9 +15,9 @@ + * for more details. + */ + +-#include "pmapi.h" +-#include "impl.h" +-#include "pmda.h" ++#include ++#include ++#include + #include "percontext.h" + + typedef struct { +diff --git a/src/pmdas/sample/src/pmda.c b/src/pmdas/sample/src/pmda.c +index ce9ce1e..7e70a35 100644 +--- a/src/pmdas/sample/src/pmda.c ++++ b/src/pmdas/sample/src/pmda.c +@@ -20,10 +20,10 @@ + * Generic driver for a daemon-based PMDA + */ + +-#include "pmapi.h" +-#include "impl.h" +-#include "pmda.h" +-#include "../domain.h" ++#include ++#include ++#include ++#include "domain.h" + #include "percontext.h" + + extern void sample_init(pmdaInterface *); +diff --git a/src/pmdas/sample/src/sample.c b/src/pmdas/sample/src/sample.c +index 8b8dc0e..c499c9f 100644 +--- a/src/pmdas/sample/src/sample.c ++++ b/src/pmdas/sample/src/sample.c +@@ -12,14 +12,14 @@ + * for more details. + */ + +-#include "pmapi.h" +-#include "impl.h" +-#include "pmda.h" +-#include "percontext.h" +-#include "events.h" + #include + #include +-#include "../domain.h" ++#include ++#include ++#include ++#include "percontext.h" ++#include "events.h" ++#include "domain.h" + #ifdef HAVE_SYSINFO + /* + * On Solaris, need and sysinfo() is different. +commit 5f102b1aa2816fc2e8c5e24674b83075f988ab03 +Author: Nathan Scott +Date: Tue Feb 11 12:27:04 2014 +1100 + + Changes to pmdatxmon to support multlib devel packages + + This removes architecture-dependent files in the development + package related to pmdatxmon. Instead of installing prebuilt + binaries, we now use the pmdasimple/pmdatrivial technique of + installing a makefile and generating them. + +diff --git a/src/pmdas/txmon/GNUmakefile b/src/pmdas/txmon/GNUmakefile +index 61d2c0d..7c423ba 100644 +--- a/src/pmdas/txmon/GNUmakefile ++++ b/src/pmdas/txmon/GNUmakefile +@@ -43,8 +43,7 @@ build-me: $(TARGETS) + + install: build-me + $(INSTALL) -m 755 -d $(PMDADIR) +- $(INSTALL) -m 755 $(IAM) $(PMDADIR)/pmda$(IAM) +- $(INSTALL) -m 755 txrecord $(SCRIPTS) $(PMDADIR) ++ $(INSTALL) -m 755 $(SCRIPTS) $(PMDADIR) + $(INSTALL) -m 644 $(DFILES) root $(HFILES) $(PMDADIR) + $(INSTALL) -m 644 help pmns domain.h $(CFILES) $(PMDADIR) + $(INSTALL) -m 644 GNUmakefile.install $(PMDADIR)/Makefile +commit 8d4a8eb3fcbee1d0f0e90cc6207b6db7b90dd5c8 +Author: Nathan Scott +Date: Tue Feb 11 15:48:16 2014 +1100 + + Changes to pcp.conf packaging to support "multilib" packaging + + Move the configuration files (pcp.conf in particular, as it is + not architecture neutral) from pcp-libs into a new pcp-conf + package packaging formats for both rpm and deb formats. + + As this is a fairly major packaging shift that people will at + times probably need to refer back to, bump the minor version + number (3.8.x -> 3.9.0). A dependency exists between pcp-libs + and pcp-conf of course, but this is no longer arch dependent. + + This is part two of three for rpm "multilib" support for pcp, + where both 32 and 64 bit variants of the -libs and -libs-devel + packages can be simultaneously installed. + + It also happens to resolve a long-standing Debian bug, so its + got that goin' for it, which is nice. + +diff --git a/debian/GNUmakefile b/debian/GNUmakefile +index acb049d..661b46a 100644 +--- a/debian/GNUmakefile ++++ b/debian/GNUmakefile +@@ -36,6 +36,10 @@ PCPPMDAINFINIBAND = pcp-pmda-infiniband + PCPPMDAINFINIBAND_FILES = pcp-pmda-infiniband.dirs pcp-pmda-infiniband.install + PCPPMDAINFINIBAND_DOC_DIR = $(PCP_DOC_DIR)/../pcp-pmda-infiniband + ++PCPCFG = pcp-conf ++PCPCFG_FILES = pcp-conf.dirs pcp-conf.install ++PCPCFG_DOC_DIR = $(PCP_DOC_DIR)/../pcp-conf ++ + LIBPCPPCP = libpcp3 + LIBPCP_FILES = libpcp3.dirs libpcp3.install + DEVPCP_FILES = libpcp3-dev.dirs libpcp3-dev.install +@@ -88,7 +92,7 @@ LSRCFILES = changelog compat control copyright rules \ + pcp.postrm.head pcp.postrm.tail configversions \ + $(LINTIAN) $(PCP_LINT) \ + $(PCP_FILES) $(LIBPCP_FILES) $(DEVPCP_FILES) \ +- $(PCPTESTSUITE_FILES) \ ++ $(PCPCFG_FILES) $(PCPTESTSUITE_FILES) \ + $(LIBGUI_FILES) $(DEVGUI_FILES) \ + $(LIBMMV_FILES) $(DEVMMV_FILES) \ + $(LIBPMDA_FILES) $(DEVPMDA_FILES) \ +@@ -119,6 +123,13 @@ ifeq ($(PACKAGE_DISTRIBUTION), debian) + $(INSTALL) -m 644 changelog $(PCPTESTSUITEDIR)/changelog.Debian + endif + ++install-pcpcfg: default ++ifeq ($(PACKAGE_DISTRIBUTION), debian) ++ $(INSTALL) -m 755 -d $(PCPCFG_DOC_DIR) ++ $(INSTALL) -m 644 copyright $(PCPCFG_DOC_DIR) ++ $(INSTALL) -m 644 changelog $(PCPCFG_DOC_DIR)/changelog.Debian ++endif ++ + install-libpcp: default + ifeq ($(PACKAGE_DISTRIBUTION), debian) + $(INSTALL) -m 755 -d $(LIBPCP_DOC_DIR) +diff --git a/debian/libpcp3.dirs b/debian/libpcp3.dirs +index 9a8b09a..e69de29 100644 +--- a/debian/libpcp3.dirs ++++ b/debian/libpcp3.dirs +@@ -1 +0,0 @@ +-usr/include/pcp +diff --git a/debian/libpcp3.install b/debian/libpcp3.install +index cdad482..ceab611 100644 +--- a/debian/libpcp3.install ++++ b/debian/libpcp3.install +@@ -1,4 +1 @@ +-etc/pcp.conf + usr/lib/libpcp.so.3 +-usr/include/pcp/builddefs +-usr/include/pcp/buildrules +diff --git a/debian/pcp-conf.dirs b/debian/pcp-conf.dirs +new file mode 100644 +index 0000000..9a8b09a +--- /dev/null ++++ b/debian/pcp-conf.dirs +@@ -0,0 +1 @@ ++usr/include/pcp +diff --git a/debian/pcp-conf.install b/debian/pcp-conf.install +new file mode 100644 +index 0000000..98a9eba +--- /dev/null ++++ b/debian/pcp-conf.install +@@ -0,0 +1,3 @@ ++etc/pcp.conf ++usr/include/pcp/builddefs ++usr/include/pcp/buildrules +commit 8fe72ef673aa98b419077f4a4f9852336dce4df0 +Author: Nathan Scott +Date: Tue Feb 11 19:16:55 2014 +1100 + + Final phase of rpm multilib support - workaround config.h differences + + Use the http://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks + technique ("myautoconf.h files with a size in them") for avoiding the + final problem in terms of multilib support. + +diff --git a/configure b/configure +index 1d34aab..b8ee2d8 100755 +--- a/configure ++++ b/configure +@@ -4496,7 +4496,7 @@ if test -z "$PACKAGE_DISTRIBUTION" ; then + fi + + +-ac_config_headers="$ac_config_headers src/include/pcp/config.h" ++ac_config_headers="$ac_config_headers src/include/pcp/config.h src/include/pcp/configsz.h" + + ac_config_files="$ac_config_files src/include/pcp/platform_defs.h" + +@@ -5190,6 +5190,7 @@ for ac_config_target in $ac_config_targets + do + case $ac_config_target in + "src/include/pcp/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pcp/config.h" ;; ++ "src/include/pcp/configsz.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pcp/configsz.h" ;; + "src/include/pcp/platform_defs.h") CONFIG_FILES="$CONFIG_FILES src/include/pcp/platform_defs.h" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; +@@ -8739,12 +8740,13 @@ fi + + done + +-for ac_header in execinfo.h ++for ac_header in execinfo.h bits/wordsize.h + do : +- ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" +-if test "x$ac_cv_header_execinfo_h" = xyes; then : ++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" ++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +-#define HAVE_EXECINFO_H 1 ++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi +@@ -13987,6 +13989,7 @@ for ac_config_target in $ac_config_targets + do + case $ac_config_target in + "src/include/pcp/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pcp/config.h" ;; ++ "src/include/pcp/configsz.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pcp/configsz.h" ;; + "src/include/pcp/platform_defs.h") CONFIG_FILES="$CONFIG_FILES src/include/pcp/platform_defs.h" ;; + "src/include/builddefs") CONFIG_FILES="$CONFIG_FILES src/include/builddefs" ;; + "src/include/pcp.conf") CONFIG_FILES="$CONFIG_FILES src/include/pcp.conf" ;; +diff --git a/configure.in b/configure.in +index 4529e31..5fcdb9b 100644 +--- a/configure.in ++++ b/configure.in +@@ -348,8 +348,8 @@ if test -z "$PACKAGE_DISTRIBUTION" ; then + fi + AC_SUBST(PACKAGE_DISTRIBUTION) + +-dnl output header with cpp defs HAVE_*, etc +-AC_CONFIG_HEADER(src/include/pcp/config.h) ++dnl output header files with cpp defs HAVE_*, etc ++AC_CONFIG_HEADERS(src/include/pcp/config.h src/include/pcp/configsz.h) + AC_OUTPUT(src/include/pcp/platform_defs.h) + + AC_CHECK_PROGS(GIT, git) +@@ -932,7 +932,7 @@ AC_CHECK_HEADERS(pwd.h grp.h regex.h sys/wait.h) + AC_CHECK_HEADERS(termio.h termios.h sys/termios.h sys/ioctl.h) + AC_CHECK_HEADERS(netdb.h sys/socket.h netinet/in.h netinet/tcp.h arpa/inet.h) + AC_CHECK_HEADERS(windows.h winsock2.h ws2tcpip.h) +-AC_CHECK_HEADERS(execinfo.h) ++AC_CHECK_HEADERS(execinfo.h bits/wordsize.h) + AC_CHECK_HEADERS(iptypes.h, [], [], [#include ]) + + dnl Check if we have ... standard way +diff --git a/src/include/buildrules b/src/include/buildrules +index 9e2c48e..638ec17 100644 +--- a/src/include/buildrules ++++ b/src/include/buildrules +@@ -112,6 +112,7 @@ realclean distclean: clean + rm -f $(TOPDIR)/src/include/builddefs \ + $(TOPDIR)/src/include/pcp.conf \ + $(TOPDIR)/src/include/pcp/config.h \ ++ $(TOPDIR)/src/include/pcp/configsz.h \ + $(TOPDIR)/src/include/pcp/platform_defs.h \ + $(TOPDIR)/src/include/pcp/pmdbg.h + rm -f $(TOPDIR)/build/GNUlocaldefs +diff --git a/src/include/pcp/GNUmakefile b/src/include/pcp/GNUmakefile +index 93cdd82..4aaf310 100644 +--- a/src/include/pcp/GNUmakefile ++++ b/src/include/pcp/GNUmakefile +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 2013 Red Hat. ++# Copyright (c) 2013-2014 Red Hat. + # Copyright (c) 2000,2004 Silicon Graphics, Inc. All Rights Reserved. + # + # This program is free software; you can redistribute it and/or modify it +@@ -18,11 +18,13 @@ include $(TOPDIR)/src/include/builddefs + -include ./GNUlocaldefs + + HFILES = pmapi.h impl.h pmda.h pmtime.h pmafm.h import.h \ +- trace.h trace_dev.h mmv_stats.h mmv_dev.h +-GENERATED_HFILES = pmdbg.h platform_defs.h config.h +-CONFFILES = config.h platform_defs.h ++ trace.h trace_dev.h mmv_stats.h mmv_dev.h \ ++ config32.h config64.h ++INFILES = config.h.in configsz.h.in platform_defs.h.in ++CONFFILES = config.h configsz.h platform_defs.h ++GENERATED_HFILES = pmdbg.h $(CONFFILES) + +-LSRCFILES = config.h.in platform_defs.h.in mk_pmdbg fault.h ++LSRCFILES = mk_pmdbg fault.h $(INFILES) + LDIRT = $(GENERATED_HFILES) + + default :: default_pcp +diff --git a/src/include/pcp/config.h.in b/src/include/pcp/config.h.in +index 2cef698..92f52ae 100644 +--- a/src/include/pcp/config.h.in ++++ b/src/include/pcp/config.h.in +@@ -80,11 +80,25 @@ extern "C" { + /* if compiler can cast __uint64_t to double */ + #undef HAVE_CAST_U64_DOUBLE + +-/* long and pointer must be either 32 bit or 64 bit */ +-#undef HAVE_64BIT_LONG +-#undef HAVE_32BIT_LONG +-#undef HAVE_32BIT_PTR +-#undef HAVE_64BIT_PTR ++/* ++ * long and pointer must be either 32 bit or 64 bit ++ * ++ * This is complicated by RPMs "multilib" feature, which requires there ++ * to be no differences between header files on 32 and 64 bit platforms. ++ */ ++#undef HAVE_BITS_WORDSIZE_H ++#ifdef HAVE_BITS_WORDSIZE_H ++# include ++# if __WORDSIZE == 32 ++# include "config32.h" ++# elif __WORDSIZE == 64 ++# include "config64.h" ++# else ++# error "Unknown word size" ++# endif ++#else ++# include "configsz.h" ++#endif + + /* Define if header file is available */ + #undef HAVE_FCNTL_H +diff --git a/src/include/pcp/config32.h b/src/include/pcp/config32.h +new file mode 100644 +index 0000000..64eba4c +--- /dev/null ++++ b/src/include/pcp/config32.h +@@ -0,0 +1,23 @@ ++/* ++ * Copyright (c) 2014 Red Hat. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * for more details. ++ */ ++ ++#ifndef _PCP_CONFIG32_H ++#define _PCP_CONFIG32_H ++ ++/* #undef HAVE_64BIT_LONG */ ++#define HAVE_32BIT_LONG 1 ++#define HAVE_32BIT_PTR 1 ++/* #undef HAVE_64BIT_PTR */ ++ ++#endif /* _PCP_CONFIG32_H */ +diff --git a/src/include/pcp/config64.h b/src/include/pcp/config64.h +new file mode 100644 +index 0000000..4bae2ee +--- /dev/null ++++ b/src/include/pcp/config64.h +@@ -0,0 +1,23 @@ ++/* ++ * Copyright (c) 2014 Red Hat. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * for more details. ++ */ ++ ++#ifndef _PCP_CONFIG64_H ++#define _PCP_CONFIG64_H ++ ++#define HAVE_64BIT_LONG 1 ++/* #undef HAVE_32BIT_LONG */ ++/* #undef HAVE_32BIT_PTR */ ++#define HAVE_64BIT_PTR 1 ++ ++#endif /* _PCP_CONFIG64_H */ +diff --git a/src/include/pcp/configsz.h.in b/src/include/pcp/configsz.h.in +new file mode 100644 +index 0000000..4a06e40 +--- /dev/null ++++ b/src/include/pcp/configsz.h.in +@@ -0,0 +1,24 @@ ++/* ++ * Copyright (c) 2014 Red Hat. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * for more details. ++ */ ++ ++#ifndef _PCP_CONFIGSZ_H ++#define _PCP_CONFIGSZ_H ++ ++/* long and pointer must be either 32 bit or 64 bit */ ++#undef HAVE_64BIT_LONG ++#undef HAVE_32BIT_LONG ++#undef HAVE_32BIT_PTR ++#undef HAVE_64BIT_PTR ++ ++#endif /* _PCP_CONFIGSZ_H */ diff --git a/SOURCES/bz1061330.patch b/SOURCES/bz1061330.patch new file mode 100644 index 0000000..dff13ca --- /dev/null +++ b/SOURCES/bz1061330.patch @@ -0,0 +1,269 @@ +commit 9b6d8dc797da00721509ed4036f864a957fff1d5 +Author: Nathan Scott +Date: Tue Feb 4 10:41:40 2014 +1100 + + Update MMV test to work after new install with no MMV tmpdir state + +diff --git a/qa/646 b/qa/646 +index 2e9cc91..cc5cfe0 100755 +--- a/qa/646 ++++ b/qa/646 +@@ -16,8 +16,27 @@ echo "QA output created by $seq" + + status=0 # success is the default! + files="$PCP_TMP_DIR/mmv/test$$ $PCP_TMP_DIR/mmv/notest$$" ++culldir=false ++ ++_cleanup() ++{ ++ rm -f $tmp.* ++ $sudo rm -f $files ++ $culldir && $sudo rm -fr "$PCP_TMP_DIR/mmv" ++} ++ + $sudo rm -rf $tmp.* $files +-trap "rm -f $tmp.*; $sudo rm -f $files; exit \$status" 0 1 2 3 15 ++trap "_cleanup; exit \$status" 0 1 2 3 15 ++ ++# is a pre-existing mmv directory in place? if so, write access needed ++if [ -d "$PCP_TMP_DIR/mmv" ] ++then ++ [ -w "$PCP_TMP_DIR/mmv" ] || _notrun "Cannot write to $PCP_TMP_DIR/mmv" ++else ++ culldir=true ++ mkdir -p "$PCP_TMP_DIR/mmv" # owned by self - for writing ++ $sudo chgrp $PCP_GROUP "$PCP_TMP_DIR/mmv" # group pcp - pmdammv reading ++fi + + _filter_mmvdump() + { + +commit 7f7a5ccc11231c4349026b295e321e5d9ad01095 +Author: Nathan Scott +Date: Wed Feb 5 14:05:26 2014 +1100 + + Resolve pmdammv sigsegv when no MMV tempdir present + + There were situations where we could call into the PMDA + tree code (dynamic namespaces) with a NULL pmns pointer, + which it would dereference. Add checks to that code (as + other tree API calls have already) and ensure pmdammv no + longer calls it in this anti-social way. + + QA tests 213 and 646 updated to function with a missing + MMV temporary directory as well. + +diff --git a/qa/213 b/qa/213 +index d0a119d..f5ad597 100755 +--- a/qa/213 ++++ b/qa/213 +@@ -25,7 +25,27 @@ fi + status=0 # success is the default! + username=`id -u -n` + $sudo rm -rf $tmp.* $seq.full +-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 ++trap "_cleanup; exit \$status" 0 1 2 3 15 ++culldir=false ++ ++_cleanup() ++{ ++ rm -f $tmp.* ++ $sudo rm -f $files ++ $culldir && $sudo rm -fr "$PCP_TMP_DIR/mmv" ++} ++ ++# is a pre-existing mmv directory in place? if so, write access needed ++if [ -d "$PCP_TMP_DIR/mmv" ] ++then ++ [ -w "$PCP_TMP_DIR/mmv" ] || _notrun "Cannot write to $PCP_TMP_DIR/mmv" ++ $sudo rm -rf $PCP_TMP_DIR/mmv/* ++else ++ culldir=true ++ $sudo mkdir -p "$PCP_TMP_DIR/mmv" ++ $sudo chown `whoami` "$PCP_TMP_DIR/mmv" # local user - tmpdir writing ++ $sudo chgrp $PCP_GROUP "$PCP_TMP_DIR/mmv" # group pcp - pmdammv reading ++fi + + _filter() + { +@@ -77,7 +97,6 @@ End-of-File + + echo + echo "=== MMV PMDA test ===" +-$sudo rm -rf $PCP_TMP_DIR/mmv/* + src/mmv_genstats + echo "installed mmv files ..." + find $PCP_TMP_DIR/mmv -type f | sed -e "s;$PCP_TMP_DIR;PCP_TMP_DIR;" +diff --git a/qa/646 b/qa/646 +index cc5cfe0..51805c6 100755 +--- a/qa/646 ++++ b/qa/646 +@@ -34,8 +34,9 @@ then + [ -w "$PCP_TMP_DIR/mmv" ] || _notrun "Cannot write to $PCP_TMP_DIR/mmv" + else + culldir=true +- mkdir -p "$PCP_TMP_DIR/mmv" # owned by self - for writing +- $sudo chgrp $PCP_GROUP "$PCP_TMP_DIR/mmv" # group pcp - pmdammv reading ++ $sudo mkdir -p "$PCP_TMP_DIR/mmv" ++ $sudo chown `whoami` "$PCP_TMP_DIR/mmv" # local user - tmpdir writing ++ $sudo chgrp $PCP_GROUP "$PCP_TMP_DIR/mmv" # group pcp - pmdammv reading + fi + + _filter_mmvdump() +diff --git a/src/libpcp_pmda/src/tree.c b/src/libpcp_pmda/src/tree.c +index 61f7086..b56001a 100644 +--- a/src/libpcp_pmda/src/tree.c ++++ b/src/libpcp_pmda/src/tree.c +@@ -1,4 +1,5 @@ + /* ++ * Copyright (c) 2014 Red Hat. + * Copyright (c) 2009-2010 Aconex. All Rights Reserved. + * + * This library is free software; you can redistribute it and/or modify it +@@ -106,6 +107,8 @@ pmdaTreePMID(__pmnsTree *pmns, const char *name, pmID *pmid) + { + __pmnsNode *node; + ++ if (!pmns || !pmns->root) ++ return PM_ERR_NAME; + if ((node = __pmdaNodeLookup(pmns->root->first, name)) == NULL) + return PM_ERR_NAME; + if (NONLEAF(node)) +diff --git a/src/pmdas/mmv/src/mmv.c b/src/pmdas/mmv/src/mmv.c +index abaa785..f3ef26f 100644 +--- a/src/pmdas/mmv/src/mmv.c ++++ b/src/pmdas/mmv/src/mmv.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2012 Red Hat. ++ * Copyright (c) 2012-2014 Red Hat. + * Copyright (c) 2009-2010 Aconex. All Rights Reserved. + * Copyright (c) 1995-2000,2009 Silicon Graphics, Inc. All Rights Reserved. + * +@@ -42,6 +42,7 @@ static int incnt; + + static int reload; + static __pmnsTree * pmns; ++static int statsdir_code; /* last statsdir stat code */ + static time_t statsdir_ts; /* last statsdir timestamp */ + static char * prefix = "mmv"; + +@@ -628,10 +629,25 @@ mmv_reload_maybe(pmdaExt *pmda) + } + } + +- /* check if the directory has been modified */ +- if (stat(statsdir, &s) >= 0 && s.st_mtime != statsdir_ts) { +- need_reload++; +- statsdir_ts = s.st_mtime; ++ /* ++ * check if the directory has been modified, reload if so; ++ * note modification may involve removal or newly appeared, ++ * a change in permissions from accessible to not (or vice- ++ * versa), and so on. ++ */ ++ if (stat(statsdir, &s) >= 0) { ++ if (s.st_mtime != statsdir_ts) { ++ need_reload++; ++ statsdir_code = 0; ++ statsdir_ts = s.st_mtime; ++ } ++ } else { ++ i = oserror(); ++ if (statsdir_code != i) { ++ statsdir_code = i; ++ statsdir_ts = 0; ++ need_reload++; ++ } + } + + if (need_reload) { +commit 3d64385188560aa3a26cdcf99e1d61fb34f3d845 +Author: Nathan Scott +Date: Tue Feb 18 13:13:18 2014 +1100 + + More work bullet-proofing the libpcp_pmda dynamic tree code + + Deal with NULL calls coming into the API in several more places, + add recoverable error handling on hash rebuild calloc failure. + +diff --git a/src/libpcp_pmda/src/tree.c b/src/libpcp_pmda/src/tree.c +index b56001a..2ece867 100644 +--- a/src/libpcp_pmda/src/tree.c ++++ b/src/libpcp_pmda/src/tree.c +@@ -48,18 +48,22 @@ __pmdaTreeReindexHash(__pmnsTree *tree, __pmnsNode *root) + void + pmdaTreeRebuildHash(__pmnsTree *tree, int numpmid) + { +- int htabsize = numpmid / 5; +- +- if (htabsize % 2 == 0) htabsize++; +- if (htabsize % 3 == 0) htabsize += 2; +- if (htabsize % 5 == 0) htabsize += 2; +- tree->htabsize = htabsize; +- tree->htab = (__pmnsNode **)calloc(htabsize, sizeof(__pmnsNode *)); +- if (tree->htab == NULL) +- __pmNotifyErr(LOG_ERR, "%s: out of memory in pmns rebuild - %s", +- pmProgname, osstrerror()); +- else +- __pmdaTreeReindexHash(tree, tree->root); ++ if (tree) { ++ int htabsize = numpmid / 5; ++ ++ if (htabsize % 2 == 0) htabsize++; ++ if (htabsize % 3 == 0) htabsize += 2; ++ if (htabsize % 5 == 0) htabsize += 2; ++ tree->htabsize = htabsize; ++ tree->htab = (__pmnsNode **)calloc(htabsize, sizeof(__pmnsNode *)); ++ if (tree->htab) { ++ __pmdaTreeReindexHash(tree, tree->root); ++ } else { ++ __pmNoMem("pmdaTreeRebuildHash", ++ htabsize * sizeof(__pmnsNode *), PM_RECOV_ERR); ++ tree->htabsize = 0; ++ } ++ } + } + + static int +@@ -81,9 +85,9 @@ __pmdaNodeCount(__pmnsNode *parent) + int + pmdaTreeSize(__pmnsTree *pmns) + { +- if (!pmns) +- return 0; +- return __pmdaNodeCount(pmns->root); ++ if (pmns && pmns->root) ++ return __pmdaNodeCount(pmns->root); ++ return 0; + } + + static __pmnsNode * +@@ -105,16 +109,17 @@ __pmdaNodeLookup(__pmnsNode *node, const char *name) + int + pmdaTreePMID(__pmnsTree *pmns, const char *name, pmID *pmid) + { +- __pmnsNode *node; +- +- if (!pmns || !pmns->root) +- return PM_ERR_NAME; +- if ((node = __pmdaNodeLookup(pmns->root->first, name)) == NULL) +- return PM_ERR_NAME; +- if (NONLEAF(node)) +- return PM_ERR_NAME; +- *pmid = node->pmid; +- return 0; ++ if (pmns && pmns->root) { ++ __pmnsNode *node; ++ ++ if ((node = __pmdaNodeLookup(pmns->root->first, name)) == NULL) ++ return PM_ERR_NAME; ++ if (NONLEAF(node)) ++ return PM_ERR_NAME; ++ *pmid = node->pmid; ++ return 0; ++ } ++ return PM_ERR_NAME; + } + + static char * diff --git a/SOURCES/bz1062443.patch b/SOURCES/bz1062443.patch new file mode 100644 index 0000000..62c460f --- /dev/null +++ b/SOURCES/bz1062443.patch @@ -0,0 +1,199 @@ +commit 0b1500ff74341c54c3da4412eb8ee8db9c58cf41 +Author: Nathan Scott +Date: Tue Feb 11 09:54:07 2014 +1100 + + Allow PMDA Install scripts to be run even when pmcd is stopped. + + Following the Install recipe from the GFS2 PMDA man page, users + can run into difficulty if pmcd is not running first. There's + no mention of that, and the error message is cryptic. This fix + extends the generic PMDA installation process to allow any PMDA + to kick-start the pmcd process if it needs to. The one wrinkle + there is a chicken-and-egg with the namespace setup, but that's + tackled via addition of a Rebuild call in the right spot. + + Reported by Andrew Price, tested by Paul Evans, myself and now + also PCP QA test 755. + + Resolves Red Hat bug #1062443. + +diff --git a/qa/755 b/qa/755 +new file mode 100755 +index 0000000..be5ae14 +--- /dev/null ++++ b/qa/755 +@@ -0,0 +1,98 @@ ++#!/bin/sh ++# PCP QA Test No. 755 ++# Exercise the Apache PMDA Install/Remove, as well as the ++# mechanism by which a PMDA can be installed with no pmcd ++# process running. ++# ++# Copyright (c) 2014 Red Hat. ++# ++ ++seq=`basename $0` ++echo "QA output created by $seq" ++ ++# get standard environment, filters and checks ++. ./common.product ++. ./common.filter ++. ./common.check ++ ++status=1 # failure is the default! ++done_clean=false ++rm -f $seq.full ++ ++install_on_cleanup=false ++pminfo apache >/dev/null 2>&1 && install_on_cleanup=true ++ ++_cleanup() ++{ ++ if $done_clean ++ then ++ : ++ else ++ [ -f $tmp.pmcd.conf ] && $sudo mv $tmp.pmcd.conf $PCP_PMCDCONF_PATH ++ rm -f $tmp.* ++ $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start ++ _wait_for_pmcd ++ _wait_for_pmlogger ++ if $install_on_cleanup ++ then ++ ( cd $PCP_PMDAS_DIR/apache; $sudo ./Install /dev/null 2>&1 ) ++ else ++ ( cd $PCP_PMDAS_DIR/apache; $sudo ./Remove >/dev/null 2>&1 ) ++ fi ++ done_clean=true ++ fi ++} ++ ++trap "_cleanup; exit \$status" 0 1 2 3 15 ++ ++_filter_apache() ++{ ++ # cull message resulting from no running httpd ++ grep -v 'Information not currently available' ++} ++ ++# real QA test starts here ++home=$PCP_PMDAS_DIR ++iam=apache ++cd $home/$iam ++unset ROOT MAKEFLAGS ++ ++# copy the pmcd config file to restore state later. ++cp $PCP_PMCDCONF_PATH $tmp.pmcd.conf ++ ++# start from a known starting point ++$sudo ./Remove >/dev/null 2>&1 ++$sudo $PCP_RC_DIR/pmcd stop ++ ++echo ++echo "=== $iam agent installation ===" ++$sudo ./Install $tmp.out 2>&1 ++# Check apache metrics have appeared ... X metrics and Y values ++_filter_pmda_install <$tmp.out \ ++| sed \ ++ -e '/^Waiting for pmcd/s/\.\.\.[. ]*$/DOTS/' \ ++ -e 's/[0-9][0-9]* warnings, //' \ ++| $PCP_AWK_PROG ' ++/Check apache metrics have appeared/ { if ($7 >= 20 && $7 <= 80) $7 = "X" ++ if ($10 >= 0 && $10 <= 80) $10 = "Y" ++ } ++ { print }' ++ ++# pmcd should have been started by the Install process - check ++if pminfo -v $iam > $tmp.info 2> $tmp.err ++then ++ : ++else ++ echo "... failed! ... here is the Install log ..." ++ cat $tmp.out ++fi ++cat $tmp.info $tmp.err | _filter_apache ++ ++echo ++echo "=== remove $iam agent ===" ++$sudo ./Remove >$tmp.out 2>&1 ++_filter_pmda_remove <$tmp.out ++ ++# success, all done ++status=0 ++exit +diff --git a/qa/755.out b/qa/755.out +new file mode 100644 +index 0000000..50b4b3b +--- /dev/null ++++ b/qa/755.out +@@ -0,0 +1,23 @@ ++QA output created by 755 ++Waiting for pmcd to terminate ... ++ ++=== apache agent installation === ++Installing the "apache" Performance Metrics Domain Agent (PMDA) ... ++ ++Apache port number [80]? Updating the Performance Metrics Name Space (PMNS) ... ++Terminate PMDA if already installed ... ++[...install files, make output...] ++Updating the PMCD control file, and notifying PMCD ... ++Starting pmcd ... ++Starting pmlogger ... ++Check apache metrics have appeared ... X metrics and Y values ++ ++=== remove apache agent === ++Culling the Performance Metrics Name Space ... ++apache ... done ++Updating the PMCD control file, and notifying PMCD ... ++[...removing files...] ++Check apache metrics have gone away ... OK ++Waiting for pmcd to terminate ... ++Starting pmcd ... ++Starting pmlogger ... +diff --git a/qa/group b/qa/group +index bb752f1..0cb02fe 100644 +--- a/qa/group ++++ b/qa/group +@@ -130,6 +130,7 @@ pmda + pmda.install + + # Assorted PMDAs ++pmda.apache + pmda.cisco + pmda.environ + pmda.gfs2 +@@ -888,6 +889,7 @@ avahi + 748 pmlogrewrite pmda.mysql local oss + 749 pmcd local oss + 750 pmda.rpm local oss ++755 pmda.apache pmda.install local oss + 768 pmlogextract local oss + 775 sanity pmfind local oss + 783 pmda.rpm local oss +diff --git a/src/pmcd/pmdaproc.sh b/src/pmcd/pmdaproc.sh +index 43cffa7..bab0161 100644 +--- a/src/pmcd/pmdaproc.sh ++++ b/src/pmcd/pmdaproc.sh +@@ -1163,6 +1163,22 @@ _install() + # Install the namespace + # + ++ if [ ! -f $NAMESPACE ] ++ then ++ # We may be installing an agent right after an install - ++ # before pmcd startup, which has a pre-execution step of ++ # rebuilding the namespace root. Do so now. ++ if [ -x $PMNSDIR/Rebuild ] ++ then ++ echo "$prog: cannot Rebuild the PMNS for \"$NAMESPACE\"" ++ exit 1 ++ fi ++ cd $PMNSDIR ++ ./Rebuild -dus ++ cd $__here ++ forced_restart=true ++ fi ++ + for __n in $pmns_name + do + if pminfo $__ns_opt $__n >/dev/null 2>&1 diff --git a/SOURCES/bz1062467.patch b/SOURCES/bz1062467.patch new file mode 100644 index 0000000..4bcbdaf --- /dev/null +++ b/SOURCES/bz1062467.patch @@ -0,0 +1,239 @@ +commit 004d8a3e46fe4c56b0ea4db27c2c618b86b54f76 +Author: Nathan Scott +Date: Mon Feb 3 17:13:12 2014 +1100 + + Fix and test python wrappers for pmLocaltime and pmCtime + + Several problems uncovered in the time-processing wrappers + of the python PMAPI module after attempting to use 'em for + the first time: + - size of 'struct tm' did not match modern reality (missing + the final two fields for Linux and BSD - sigsegv results); + - system time.mktime python method does not take 9 arguments + just one - fix the string-printing method for struct tm; + - system time.mktime takes year field as an actual year, and + not the number of years since 1900 - code didn't cater for + this difference to struct tm form returned from localtime. + - definition of the pmLocaltime return code was not correct; + - definition of first pmCtime parameter was not correct; + - code didn't cope with numeric input being passed in either + float/integer format - pythonic time-in-seconds is float. + - no memory allocated to hold the struct tm that pmLocaltime + returns - pointer passed in pointing off into lala-land; + - need to ensure a pointer to a ctypes c_long is passed into + both of these routines - caller might well pass int (e.g. + from a pmResult timestamp (struct timeval, tv_sec field). + + Fixed the above and added qa test (boeing) 737 to verify it. + Some small cleanups as well, in the affected code - fixed a + couple of typos in comments, and removed an unused import + of struct_time from the system time module. + +diff --git a/qa/737 b/qa/737 +new file mode 100755 +index 0000000..17d6c18 +--- /dev/null ++++ b/qa/737 +@@ -0,0 +1,29 @@ ++#!/bin/sh ++# PCP QA Test No. 737 ++# Exercise time interfaces in python PMAPI wrapper module. ++# ++# Copyright (c) Red Hat. ++# ++ ++seq=`basename $0` ++echo "QA output created by $seq" ++ ++# get standard environment, filters and checks ++. ./common.product ++. ./common.filter ++. ./common.check ++ ++python -c "from pcp import pmda" >/dev/null 2>&1 ++[ $? -eq 0 ] || _notrun "python pcp pmda module not installed" ++ ++status=1 # failure is the default! ++$sudo rm -rf $tmp.* $seq.full ++trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15 ++ ++# real QA test starts here ++python src/test_pcp_time.python ++ ++# success, all done ++status=0 ++ ++exit +diff --git a/qa/737.out b/qa/737.out +new file mode 100644 +index 0000000..6a12e50 +--- /dev/null ++++ b/qa/737.out +@@ -0,0 +1,5 @@ ++QA output created by 737 ++pmLocaltime from int: 1388763979.0 (2014, 1, 3, 15, 46, 19, 1, 33, 0) ++pmLocaltime from float: 1388763979.0 (2014, 1, 3, 15, 46, 19, 1, 33, 0) ++pmCtime from int: Mon Feb 3 15:46:19 2014 ++pmCtime from float: Mon Feb 3 15:46:19 2014 +diff --git a/qa/group b/qa/group +index 077b83c..bb752f1 100644 +--- a/qa/group ++++ b/qa/group +@@ -883,6 +883,7 @@ avahi + 733 pmie pmval pmdumplog local oss + 735 pmda.proc local oss + 736 pmlogrewrite local oss ++737 python local oss + 740 pmda.sample pmstore secure local oss + 748 pmlogrewrite pmda.mysql local oss + 749 pmcd local oss +diff --git a/qa/src/GNUlocaldefs b/qa/src/GNUlocaldefs +index b4382ce..0cf7971 100644 +--- a/qa/src/GNUlocaldefs ++++ b/qa/src/GNUlocaldefs +@@ -154,7 +154,8 @@ PLFILES = $(shell echo $(PERLFILES) | sed -e 's/\.perl/.pl/g') + PYTHONFILES = \ + test_pcp.python test_pmcc.python \ + test_pmi.python check_import.python \ +- test_mmv.python test_webapi.python ++ test_mmv.python test_webapi.python \ ++ test_pcp_time.python + # not installed: + PYFILES = $(shell echo $(PYTHONFILES) | sed -e 's/\.python/.py/g') + +diff --git a/qa/src/test_pcp_time.python b/qa/src/test_pcp_time.python +new file mode 100755 +index 0000000..674686b +--- /dev/null ++++ b/qa/src/test_pcp_time.python +@@ -0,0 +1,32 @@ ++#!/usr/bin/python ++# ++# Copyright (C) 2014 Red Hat. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++""" Exercise the pmCtime and pmLocaltime interfaces """ ++ ++from pcp import pmapi ++ ++""" Create a live PMAPI context, set as UTC and report time """ ++context = pmapi.pmContext() ++context.pmNewZone("UTC") ++ ++# seconds-since-epoch for: "Mon Feb 3 15:46:19 2014 UTC" ++sample_time_i = 1391402779 # integer ++sample_time_f = 1391402779.0 # float ++ ++print "pmLocaltime from int: ", context.pmLocaltime(sample_time_i) ++print "pmLocaltime from float: ", context.pmLocaltime(sample_time_f) ++ ++print "pmCtime from int: ", context.pmCtime(sample_time_i), ++print "pmCtime from float: ", context.pmCtime(sample_time_f), +diff --git a/src/python/pcp/pmapi.py b/src/python/pcp/pmapi.py +index 527a1f3..72302b4 100644 +--- a/src/python/pcp/pmapi.py ++++ b/src/python/pcp/pmapi.py +@@ -56,7 +56,7 @@ + # Is this the kernel.all.load id? + if (results.contents.get_pmid(i) != metric_ids[1]): + continue +- # Extrace the kernal.all.load instance ++ # Extract the kernel.all.load instance + for j in xrange(results.contents.get_numval(i) - 1): + atom = context.pmExtractValue(results.contents.get_valfmt(i), + results.contents.get_vlist(i, j), +@@ -69,8 +69,8 @@ + print "load average 5=",atom.f + """ + +-# for dereferencing times from pmLocaltime function (struct tm) +-from time import struct_time, mktime ++# for reporting on times from pmLocaltime function ++from time import mktime + + # constants adapted from C header file + import cpmapi as c_api +@@ -148,13 +148,20 @@ class tm(Structure): + ("tm_year", c_int), + ("tm_wday", c_int), + ("tm_yday", c_int), +- ("tm_isdst", c_int)] ++ ("tm_isdst", c_int), ++ ("tm_gmtoff", c_long), # glibc/bsd extension ++ ("tm_zone", c_char_p)] # glibc/bsd extension + + def __str__(self): +- tmp = mktime(self.tm_year, self.tm_mon, self.tm_mday, self.tm_hour, +- self.tm_min, self.tm_sec, self.tm_wday, self.tm_yday, +- self.tm_isdst) +- return "%s" % tmp.__str__() ++ timetuple = (self.tm_year+1900, self.tm_mon, self.tm_mday, ++ self.tm_hour, self.tm_min, self.tm_sec, ++ self.tm_wday, self.tm_yday, self.tm_isdst) ++ inseconds = 0.0 ++ try: ++ inseconds = mktime(timetuple) ++ except: ++ pass ++ return "%s %s" % (inseconds.__str__(), timetuple) + + class pmAtomValue(Union): + """Union used for unpacking metric values according to type +@@ -512,11 +519,11 @@ LIBPCP.pmUseZone.argtypes = [c_int] + LIBPCP.pmWhichZone.restype = c_int + LIBPCP.pmWhichZone.argtypes = [POINTER(c_char_p)] + +-LIBPCP.pmLocaltime.restype = tm ++LIBPCP.pmLocaltime.restype = POINTER(tm) + LIBPCP.pmLocaltime.argtypes = [POINTER(c_long), POINTER(tm)] + + LIBPCP.pmCtime.restype = c_char_p +-LIBPCP.pmCtime.argtypes = [c_long, c_char_p] ++LIBPCP.pmCtime.argtypes = [POINTER(c_long), c_char_p] + + + ## +@@ -689,7 +696,7 @@ class pmContext(object): + status = LIBPCP.pmUseContext(self.ctx) + if status < 0: + raise pmErr, status +- status = LIBPCP.pmGetChildren(name, byref( offspring)) ++ status = LIBPCP.pmGetChildren(name, byref(offspring)) + if status < 0: + raise pmErr, status + if status > 0: +@@ -1148,16 +1155,20 @@ class pmContext(object): + status = LIBPCP.pmUseContext(self.ctx) + if status < 0: + raise pmErr, status +- result = POINTER(tm)() +- return LIBPCP.pmLocaltime(seconds, byref(result)) ++ result = (tm)() ++ timetp = c_long(int(seconds)) ++ LIBPCP.pmLocaltime(byref(timetp), byref(result)) ++ return result + + def pmCtime(self, seconds): + """PMAPI - format the date and time for a reporting timezone """ + status = LIBPCP.pmUseContext(self.ctx) + if status < 0: + raise pmErr, status +- result = (c_char * 32)() +- return LIBPCP.pmCtime(seconds, byref(result)) ++ result = ctypes.create_string_buffer(32) ++ timetp = c_long(int(seconds)) ++ LIBPCP.pmCtime(byref(timetp), result) ++ return str(result.value) + + ## + # PMAPI Metrics Services diff --git a/SOURCES/bz1064254.patch b/SOURCES/bz1064254.patch new file mode 100644 index 0000000..732127c --- /dev/null +++ b/SOURCES/bz1064254.patch @@ -0,0 +1,177 @@ +commit 5ebdf2fe3f1aca661ed1a13a6aa45e3c27d228c2 +Author: Nathan Scott +Date: Thu Feb 13 14:12:49 2014 +1100 + + Fix valgrind errors in pmdalinux /proc/stat refresh + + This one has bugged me for a long time, and I finally needed to spend + some time hunting an obscure memory corruption in pmdalinux - so got + to revisit this properly. + + There were a few small problems in refresh_proc_stat causing valgrind + to report "invalid read of zero size". Most problematic was the code + reading the stat buffer initially, which slightly confuses the offset + and size combo in passing a buffer pointer to read(2). The realloc + call here also happened to allocate 8x the (small) memory it wanted, + accidently multiplying the size by sizeof(char). + + The nbufindex calculation also ended up with one more line than was + in the buffer, which was OK because it always created an empty line + at the end of it (which doesn't actually exist in /proc/stat). + + Finally, added some small improvements to the handling of ENOMEM for + these global stat buffers, and removed a double-memset on the initial + call (which callocs a zeroed buffer). + +diff --git a/src/pmdas/linux/proc_stat.c b/src/pmdas/linux/proc_stat.c +index f4e001c..234b713 100644 +--- a/src/pmdas/linux/proc_stat.c ++++ b/src/pmdas/linux/proc_stat.c +@@ -1,7 +1,7 @@ + /* + * Linux /proc/stat metrics cluster + * +- * Copyright (c) 2012 Red Hat. ++ * Copyright (c) 2012-2014 Red Hat. + * Copyright (c) 2008-2009 Aconex. All Rights Reserved. + * Copyright (c) 2000,2004-2008 Silicon Graphics, Inc. All Rights Reserved. + * +@@ -39,22 +39,28 @@ refresh_proc_stat(proc_cpuinfo_t *proc_cpuinfo, proc_stat_t *proc_stat) + static char **bufindex; + static int nbufindex; + static int maxbufindex; ++ int size; + int n; + int i; + int j; + +- if (fd >= 0) +- lseek(fd, 0, SEEK_SET); +- else ++ if (fd >= 0) { ++ if (lseek(fd, 0, SEEK_SET) < 0) ++ return -oserror(); ++ } else { + if ((fd = open("/proc/stat", O_RDONLY)) < 0) + return -oserror(); ++ } + + for (n=0;;) { +- if (n >= maxstatbuf) { +- maxstatbuf += 512; +- statbuf = (char *)realloc(statbuf, maxstatbuf * sizeof(char)); ++ while (n >= maxstatbuf) { ++ size = maxstatbuf + 512; ++ if ((statbuf = (char *)realloc(statbuf, size)) == NULL) ++ return -ENOMEM; ++ maxstatbuf = size; + } +- if ((i = read(fd, statbuf+n, 512)) > 0) ++ size = (statbuf + maxstatbuf) - (statbuf + n); ++ if ((i = read(fd, statbuf + n, size)) > 0) + n += i; + else + break; +@@ -62,20 +68,24 @@ refresh_proc_stat(proc_cpuinfo_t *proc_cpuinfo, proc_stat_t *proc_stat) + statbuf[n] = '\0'; + + if (bufindex == NULL) { ++ size = 4 * sizeof(char *); ++ if ((bufindex = (char **)malloc(size)) == NULL) ++ return -ENOMEM; + maxbufindex = 4; +- bufindex = (char **)malloc(maxbufindex * sizeof(char *)); + } + + nbufindex = 0; +- bufindex[nbufindex++] = statbuf; ++ bufindex[nbufindex] = statbuf; + for (i=0; i < n; i++) { +- if (statbuf[i] == '\n') { ++ if (statbuf[i] == '\n' || statbuf[i] == '\0') { + statbuf[i] = '\0'; +- if (nbufindex >= maxbufindex) { ++ if (nbufindex + 1 >= maxbufindex) { ++ size = (maxbufindex + 4) * sizeof(char *); ++ if ((bufindex = (char **)realloc(bufindex, size)) == NULL) ++ return -ENOMEM; + maxbufindex += 4; +- bufindex = (char **)realloc(bufindex, maxbufindex * sizeof(char *)); + } +- bufindex[nbufindex++] = statbuf + i + 1; ++ bufindex[++nbufindex] = statbuf + i + 1; + } + } + +@@ -130,19 +140,19 @@ refresh_proc_stat(proc_cpuinfo_t *proc_cpuinfo, proc_stat_t *proc_stat) + proc_stat->n_steal = calloc(1, n); + proc_stat->n_guest = calloc(1, n); + } +- +- /* reset per-node stats */ +- n = proc_cpuinfo->node_indom->it_numinst * sizeof(unsigned long long); +- memset(proc_stat->n_user, 0, n); +- memset(proc_stat->n_nice, 0, n); +- memset(proc_stat->n_sys, 0, n); +- memset(proc_stat->n_idle, 0, n); +- memset(proc_stat->n_wait, 0, n); +- memset(proc_stat->n_irq, 0, n); +- memset(proc_stat->n_sirq, 0, n); +- memset(proc_stat->n_steal, 0, n); +- memset(proc_stat->n_guest, 0, n); +- ++ else { ++ /* reset per-node stats */ ++ n = proc_cpuinfo->node_indom->it_numinst * sizeof(unsigned long long); ++ memset(proc_stat->n_user, 0, n); ++ memset(proc_stat->n_nice, 0, n); ++ memset(proc_stat->n_sys, 0, n); ++ memset(proc_stat->n_idle, 0, n); ++ memset(proc_stat->n_wait, 0, n); ++ memset(proc_stat->n_irq, 0, n); ++ memset(proc_stat->n_sirq, 0, n); ++ memset(proc_stat->n_steal, 0, n); ++ memset(proc_stat->n_guest, 0, n); ++ } + /* + * cpu 95379 4 20053 6502503 + * 2.6 kernels have 3 additional fields + +commit f5eaeea7900390ae007f5ed3375cadc6ca86497e +Author: Nathan Scott +Date: Thu Feb 13 14:20:52 2014 +1100 + + Fix s390x platform issues in /proc/cpuinfo parser + + The format of /proc/cpuinfo on s390x is nothing like any other + platform. We cannot attempt to push it through the same code + path, it simply has nothing in common. If we try (as we used to) + things fall apart when we use the (negative) cpu number local + variable to index into the cpuinfo array. + + Resolved by adding in some defensive code to short-circuit the + decoding logic when an unexpected file format is seen. + +diff --git a/src/pmdas/linux/proc_cpuinfo.c b/src/pmdas/linux/proc_cpuinfo.c +index 6380bc2..d0aa52a 100644 +--- a/src/pmdas/linux/proc_cpuinfo.c ++++ b/src/pmdas/linux/proc_cpuinfo.c +@@ -1,7 +1,7 @@ + /* + * Linux /proc/cpuinfo metrics cluster + * +- * Copyright (c) 2013 Red Hat. ++ * Copyright (c) 2013-2014 Red Hat. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Portions Copyright (c) 2001 Gilly Ran (gilly@exanet.com) - for the + * portions supporting the Alpha platform. All rights reserved. +@@ -185,6 +185,9 @@ refresh_proc_cpuinfo(proc_cpuinfo_t *proc_cpuinfo) + } + #endif + ++ if (cpunum < 0 || cpunum >= proc_cpuinfo->cpuindom->it_numinst) ++ continue; ++ + info = &proc_cpuinfo->cpuinfo[cpunum]; + + /* note: order is important due to strNcmp comparisons */ diff --git a/SOURCES/bz1064311.patch b/SOURCES/bz1064311.patch new file mode 100644 index 0000000..9d197c8 --- /dev/null +++ b/SOURCES/bz1064311.patch @@ -0,0 +1,964 @@ +commit a3c1beeeca0280efb2a84303fce4603f7815771c +Author: Nathan Scott +Date: Mon Feb 17 13:54:57 2014 +1100 + + Do not include the generated qa_outfiles in the source tarball + + This excluded qa_outfiles (generated list of QA test validated outputs) + from the source tarball shipped for each release. The problem that its + caused is that patching a tree with a new test results in the test .out + file being exluded from pcp-testsuite, since its not included with the + original list. + + Resolves Red Hat bug #1064311. + +diff --git a/qa/GNUmakefile b/qa/GNUmakefile +index ecc7155..c48ed03 100644 +--- a/qa/GNUmakefile ++++ b/qa/GNUmakefile +@@ -49,7 +49,7 @@ COMMON = common.check common.config common.filter \ + common.product common.rc common.setup \ + common.secure common.gfs2 common.rpm + +-OTHERS = GNUmakefile.install group qa_hosts.master qa_outfiles README \ ++OTHERS = GNUmakefile.install group qa_hosts.master README \ + valgrind-suppress sanity.coverage + + DOTOUTFILES = $(shell [ -f qa_outfiles ] && cat qa_outfiles || ls -1 | grep '^[0-9]' | grep -v '^[0-9][0-9][0-9]$$' | grep -v '^[0-9][0-9][0-9][0-9]$$' | egrep -v '^[0-9][0-9][0-9]*\.(full|out\.bad|notrun|work)' | tee qa_outfiles) +diff -Naurp a/qa/qa_outfiles b/qa/qa_outfiles +--- a/qa/qa_outfiles 2014-01-15 10:14:44.000000000 +1100 ++++ b/qa/qa_outfiles 1970-01-01 10:00:00.000000000 +1000 +@@ -1,933 +0,0 @@ +-000.out +-001.out +-002.out +-003.out +-004.out +-005.out +-006.out.1 +-006.out.2 +-007.out +-008.out.bozo +-008.out.bozo-laptop +-008.out.bozo+sdc +-008.out.canary +-008.out.Colleens-iMac +-008.out.comma +-008.out.edge +-008.out.groan +-008.out.grunt +-008.out.hades +-008.out.kenj-pc +-008.out.kmcdonell-laptop +-008.out.liz +-008.out.moomba +-008.out.ppp-kenmcd +-008.out.smash +-008.out.sweet +-008.out.verge +-008.out.whirr +-009.out +-010.out +-011.out +-012.darwin +-012.irix +-012.linux +-012.linux.2 +-012.solaris +-013.out +-014.out +-015.out +-016.out +-017.out +-018.out +-019.darwin +-019.irix +-019.linux.1 +-019.linux.2 +-019.linux.3 +-019.linux.4 +-019.solaris +-020.out +-021.out +-022.linux.2 +-022.linux.3 +-022.linux.4 +-023.out.1 +-023.out.2 +-024.out.1 +-024.out.2 +-024.out.3 +-024.out.4 +-025.out +-026.out +-027.out +-028.out.1 +-028.out.2 +-029.out +-030.out +-031.out.darwin +-031.out.irix +-031.out.linux +-031.out.solaris +-032.out +-033.out.0 +-033.out.1 +-033.out.2 +-033.out.3 +-033.out.4 +-034.out +-037.out +-038.out +-039.out +-040.out +-041.out.1 +-041.out.2 +-043.out +-044.darwin +-044.irix +-044.linux +-044.linux.1 +-045.out +-046.out +-048.out +-049.out.1 +-049.out.2 +-050.out.1 +-050.out.2 +-051.hosts +-051.out.2 +-051.out.3 +-051.out.4 +-051.out.5 +-052.out.1 +-052.out.2 +-053.out +-054.out +-055.out +-057.out.1 +-057.out.2 +-058.out +-059.out +-060.out +-061.out.1 +-061.out.2 +-062.out.1 +-062.out.2 +-063.out +-065.out +-066.out.1 +-066.out.2 +-066.out.3 +-066.out.4 +-066.out.5 +-067.out.1 +-067.out.2 +-067.out.3 +-067.out.4 +-068.out +-069.out.ipv4 +-069.out.ipv6 +-070.out.1 +-070.out.2 +-071.out +-072.out +-074.out.noproc +-074.out.other +-075.out.2 +-075.out.3 +-075.out.4 +-075.out.6 +-075.out.7 +-076.out +-077.out +-078.out.1 +-078.out.2 +-079.out +-080.out +-081.out +-082.out.1 +-082.out.2 +-082.out.3 +-083.out +-084.out +-085.out +-086.out +-087.out +-088.out +-089.out +-090.out +-091.out +-092.out.1 +-092.out.2 +-093.out +-094.out +-095.out +-096.out +-097.out +-098.out +-099.out +-100.out +-101.out +-102.out +-103.out +-1044.out +-1045.out +-1046.out +-1047.out +-1049.out +-104.out +-1050.out +-1051.out.darwin +-1051.out.irix +-1051.out.linux +-1051.out.solaris +-105.out +-106.out +-107.out +-108.out +-109.out +-1108.out +-110.out +-111.out +-112.out.1 +-112.out.2 +-113.out +-114.out +-115.out +-116.out +-117.out +-118.out +-119.new.out +-119.old.out +-120.out +-121.out +-122.out +-123.out +-124.out +-125.out +-126.out.1 +-126.out.2 +-127.out +-128.out +-129.out +-130.out.0 +-130.out.1 +-131.out +-132.out +-133.out +-134.out +-135.out +-136.out +-137.out +-138.out.1 +-138.out.2 +-139.out +-140.out +-141.out +-142.out +-143.out.1 +-143.out.2 +-144.out +-145.out.1 +-145.out.2 +-146.out.1 +-146.out.2 +-147.out +-148.out +-149.out.irix +-149.out.linux +-150.out +-151.out.1 +-151.out.2 +-152.out +-153.out +-154.out.1 +-154.out.2 +-155.out +-156.out.1 +-156.out.2 +-157.out +-158.out.1 +-158.out.2 +-159.out.1 +-159.out.2 +-159.out.3 +-160.out +-161.out +-162.out.1 +-162.out.2 +-162.out.3 +-162.out.4 +-162.out.5 +-163.out.1 +-163.out.2 +-164.out +-165.out +-166.out +-167.out +-168.out +-169.out +-170.out +-171.out +-172.out.1 +-172.out.2 +-173.out +-174.out +-175.out +-176.out.1 +-176.out.2 +-177.out +-178.out +-179.out +-180.out.1 +-180.out.2 +-180.out.3 +-181.out.1 +-181.out.2 +-182.out +-183.out.irix +-183.out.linux +-184.out +-185.out +-186.out +-187.out +-188.darwin +-188.irix +-188.linux +-188.linux.fc6 +-188.solaris +-189.out +-190.out +-191.out +-192.out +-193.out +-194.out +-195.out +-196.out +-197.out +-198.out +-199.out +-200.out.1 +-200.out.2 +-201.out +-202.out +-203.out +-204.out +-205.out +-206.out +-207.out +-208.out +-209.out.1 +-209.out.2 +-210.out +-211.out +-212.out +-213.out +-214.out +-215.out.irix +-215.out.linux +-216.out +-217.out.1 +-217.out.2 +-218.out +-219.out +-220.out +-221.out +-222.out +-223.out +-224.out +-225.out +-226.out.1 +-226.out.2 +-226.out.3 +-227.out +-228.out +-229.out +-230.out +-231.out +-232.out +-233.out +-234.out +-235.out.1 +-235.out.2 +-236.out.1 +-236.out.2 +-237.out.1 +-237.out.2 +-238.out.1 +-238.out.2 +-239.out.1 +-239.out.2 +-240.out.1 +-240.out.2 +-241.out.1 +-241.out.2 +-242.out +-243.out.1 +-243.out.2 +-243.out.3 +-243.out.4 +-243.out.5 +-244.out.1 +-244.out.2 +-245.out.1 +-245.out.2 +-245.out.3 +-246.out +-247.out +-248.out.1 +-248.out.2 +-249.out +-250.out.3 +-250.out.irix +-250.out.linux +-251.out +-252.out +-253.out +-254.out.1 +-254.out.2 +-255.out.1 +-255.out.2 +-255.out.3 +-255.out.4 +-255.out.5 +-256.out.1 +-256.out.2 +-257.out +-258.out +-259.out +-260.out +-261.out.1 +-261.out.2 +-261.out.3 +-262.irix +-262.linux +-263.out +-264.out +-265.out +-266.out.1 +-266.out.2 +-267.out +-268.out +-269.out +-270.out +-271.out +-272.out +-273.out +-274.out.1 +-274.out.2 +-275.out +-276.out +-277.out +-278.irix +-278.linux +-279.out +-280.out +-281.out +-282.out.2.1 +-282.out.3 +-282.out.4 +-282.out.5 +-282.out.pre-2.1 +-283.out.1 +-283.out.2 +-284.out +-285.out +-286.out +-287.out.32 +-287.out.64 +-288.out +-289.out +-290.out +-291.out +-292.out +-293.out +-294.out.1 +-294.out.2 +-294.out.3 +-294.out.4 +-295.out.1 +-295.out.2 +-296.out +-297.out +-298.out.1 +-298.out.2 +-299.out.1 +-299.out.2 +-299.out.3 +-300.out.1 +-300.out.2 +-301.out +-302.out +-303.out +-304.out +-305.out +-306.out +-307.out +-308.out +-309.out +-310.out +-311.out +-312.out +-313.62_6512plus +-313.6511minus +-314.out +-315.out +-316.out +-317.out +-318.out +-319.out +-320.out.1 +-320.out.2 +-321.out +-322.out.1 +-322.out.2 +-323.out.1 +-323.out.2 +-324.out.1 +-324.out.2 +-325.out +-326.out +-327.out +-328.out +-329.out +-330.out +-331.out +-332.out +-333.out +-334.out +-335.out +-336.out +-337.out +-338.out +-339.out +-340-v1v2.out +-340-v2.out +-341.out +-342.out +-343.out +-344.out.1 +-344.out.2 +-344.out.3 +-345.out +-346.out.1 +-346.out.2 +-347.out.1 +-347.out.2 +-348.out.1 +-348.out.2 +-349.out.1 +-349.out.2 +-350.out +-351.out +-352.out +-353.out +-354.out +-355.out +-356.out +-357.out.1 +-357.out.2 +-358.out +-359.out +-360.out +-361.out.1 +-361.out.2 +-362.out +-363.out.1 +-363.out.2 +-364.out +-365.out.1 +-365.out.2 +-365.out.3 +-365.out.4 +-365.out.5 +-366.out +-367.out.1 +-367.out.be.2 +-367.out.le.2 +-368.darwin.1 +-368.darwin.2 +-368.other.1 +-368.other.2 +-369.out.1 +-369.out.2 +-369.out.3 +-369.out.4 +-370.out.1 +-370.out.2 +-370.out.3 +-370.out.4 +-370.out.5 +-370.out.6 +-371.out +-372.out +-373.out +-374.out.1 +-374.out.2 +-375.darwin +-375.darwin.2 +-375.darwin.3 +-375.linux +-375.linux.2 +-375.linux.3 +-375.solaris.2 +-375.solaris.3 +-376.out +-377.out +-378.out +-379.out +-380.out +-381.out +-382.out.1 +-382.out.2 +-383.out +-384.out +-385.out +-386.out +-387.out +-388.out +-389.out +-390.out +-391.out +-392.out.1 +-392.out.2 +-393.out +-394.out +-395.out +-396.out +-397.out +-398.out +-399.out +-400.out +-401.out +-402.out +-403.out +-404.out +-405.out +-406.out.1 +-406.out.2 +-407.out +-408.out +-409.out +-410.out +-411.out.0 +-411.out.1 +-411.out.2 +-412.out +-413.out +-414.out +-415.out +-416.out +-417.irix.1 +-417.linux.1 +-417.linux.2 +-417.linux.3 +-418.out +-419.darwin +-419.irix +-419.linux +-420.out +-421.out +-422.out.be +-422.out.le +-423.out +-424.out +-425.out +-426.out +-427.out +-428.out +-429.out.1 +-429.out.2 +-430.out.1 +-430.out.2 +-431.out +-432.out +-433.out +-434.out +-435.out +-436.out +-437.out +-438.out.1 +-438.out.2 +-439.out +-440.out +-441.out +-442.out +-443.out +-444.out.1 +-444.out.2 +-444.out.3 +-445.out +-446.out +-447.out +-448.out +-449.out.1 +-449.out.2 +-450.out +-451.out +-452.out +-453.out +-454.out +-455.out +-456.out +-457.out +-458.out +-459.out +-460.out +-461.out +-462.out +-463.out +-464.out.1 +-464.out.2 +-465.out.1 +-465.out.2 +-465.out.3 +-466.out.1 +-466.out.2 +-467.out +-468.out +-469.out +-470.out +-471.out +-472.out +-473.out +-474.out +-475.out +-476.out +-477.out +-478.out +-479.out.1 +-479.out.2 +-480.out.1 +-480.out.2 +-481.out +-482.out +-483.out +-484.out +-485.out +-486.out +-487.out +-488.out +-489.out +-490.out +-491.out.be +-491.out.le +-492.out.1 +-492.out.2 +-493.out +-494.out +-495.out +-496.out +-497.out +-498.out.1 +-498.out.2 +-498.out.3 +-499.out +-500.out +-501-irix.out +-501-linux.out +-502.out +-503.out +-504.out.1 +-504.out.2 +-505.out +-506.out +-507.out +-508.out +-509.out.1 +-509.out.2 +-510.out +-511.out +-512.out.1 +-512.out.2 +-513.out.1 +-513.out.2 +-514.out.1 +-514.out.2 +-515.out +-516.out +-517.out +-518.out +-519.irix +-519.linux +-520.out.1 +-520.out.2 +-521.out +-522.out +-523.out +-524.out +-525.out +-526.out +-527.out +-528.out +-529.out +-530.out +-531.out +-532.out.1 +-532.out.2 +-533.out +-534.out +-535.out +-536.out +-537.out +-538.out +-539.out +-540.out +-541.out +-542.out +-543.out +-544.out +-545.out +-546.out +-547.out +-548.out +-549.out +-550.out +-551.out +-552.out +-553.out +-554.out +-555.irix +-555.linux +-556.out +-557.out +-558.out.irix +-558.out.linux +-559.out +-560.out +-564.out +-565.irix +-565.linux +-565.out.2 +-566.out +-569.out +-570.out.1 +-570.out.2 +-571.out +-572.out +-574.out.darwin +-574.out.irix +-574.out.linux +-574.out.solaris +-575.out.1 +-575.out.2 +-578.out.1 +-578.out.2 +-580.out.darwin +-580.out.irix +-580.out.linux +-580.out.linux.noproc +-581.out +-583.out +-584.out +-587.darwin +-587.irix +-587.linux +-587.solaris +-589.out +-592.out +-593.out +-594.out +-597.out.1 +-597.out.2 +-599.out +-600.out.darwin +-600.out.irix +-600.out.linux.0 +-600.out.linux.1 +-600.out.linux.2 +-600.out.linux.3 +-600.out.linux.4 +-600.out.solaris +-601.out +-602.out +-603.out +-605.in +-614.out +-617.out.1 +-617.out.2 +-617.out.3 +-622.out +-628.out +-633.out.1 +-633.out.2 +-634.out +-635.out +-636.out +-638.out.1 +-638.out.2 +-639.out.1 +-639.out.2 +-640.out +-642.out.1 +-642.out.2 +-642.out.3 +-643.out +-644.out +-645.out +-646.out +-647.out.1 +-647.out.2 +-648.out.1 +-648.out.2 +-649.out.1 +-649.out.2 +-650.out +-651.out +-652.out +-653.out +-654.out +-655.out +-660.out.4 +-660.out.46 +-703.out.1 +-703.out.2 +-704.out +-705.out +-706.out +-707.out +-708.out +-709.out +-710.out +-711.out +-712.out +-713.out +-714.out +-715.out.1 +-715.out.2 +-716.out.1 +-716.out.2 +-717.out +-718.out +-719.out +-720.out +-721.out +-722.out +-723.out +-724.out +-725.out +-733.out +-735.out +-736.out +-740.out +-748.out +-749.out +-750.out.1 +-750.out.2 +-768.out +-775.out +-783.out +-823.out +-827.out +-831.out +-832.out +-840.out +-861.out +-875.out +-876.out +-943.out.1 +-943.out.2 +-944.out +-945.out +-946.out +-994.out diff --git a/SOURCES/bz1067547.patch b/SOURCES/bz1067547.patch new file mode 100644 index 0000000..c8838a5 --- /dev/null +++ b/SOURCES/bz1067547.patch @@ -0,0 +1,1026 @@ +diff -Naurp a/man/man1/pmlogger.1 b/man/man1/pmlogger.1 +--- a/man/man1/pmlogger.1 2014-01-14 08:40:15.000000000 +1100 ++++ b/man/man1/pmlogger.1 2014-02-26 14:34:37.597237966 +1100 +@@ -35,6 +35,7 @@ + [\f3\-v\f1 \f2volsize\f1] + [\f3\-V\f1 \f2version\f1] + [\f3\-x\f1 \f2fd\f1] ++[\f3\-y\f1] + \f2archive\f1 + .SH DESCRIPTION + .B pmlogger +@@ -329,6 +330,11 @@ The + option may be used to limit the execution time using the format + of time as prescribed by + .BR PCPIntro (1). ++The time is interpreted within the time zone of the PMCD server, ++unless the ++.B \-y ++option is given, within which case the time zone at this logger ++host is used. + .nf + Some examples of different formats: + .in 1i +diff -Naurp a/src/pmlogger/pmnewlog.sh b/src/pmlogger/pmnewlog.sh +--- a/src/pmlogger/pmnewlog.sh 2014-01-09 07:45:21.000000000 +1100 ++++ b/src/pmlogger/pmnewlog.sh 2014-02-26 14:34:37.598238056 +1100 +@@ -179,7 +179,7 @@ _do_cmd() + # part of the pmlogger control file for a long-running pmlogger. + # + +-while getopts "a:C:c:D:Ll:Nm:n:Pp:rst:T:Vv:" c ++while getopts "a:C:c:D:Ll:Nm:n:Pp:rst:T:Vv:y" c + do + case $c + in +@@ -253,7 +253,7 @@ do + # pmlogger flags passed through + # + +- L|r) ++ L|r|y) + args="$args-$c " + ;; + +diff -Naurp a/src/pmlogger/src/pmlogger.c b/src/pmlogger/src/pmlogger.c +--- a/src/pmlogger/src/pmlogger.c 2014-01-14 14:52:52.000000000 +1100 ++++ b/src/pmlogger/src/pmlogger.c 2014-02-26 14:34:37.599237958 +1100 +@@ -476,6 +476,7 @@ main(int argc, char **argv) + int sts; + int sep = __pmPathSeparator(); + int errflag = 0; ++ int use_localtime = 0; + int isdaemon = 0; + char *pmnsfile = PM_NS_DEFAULT; + char *username; +@@ -500,7 +501,7 @@ main(int argc, char **argv) + * corresponding changes are made to pmnewlog when pmlogger + * options are passed through from the control file + */ +- while ((c = getopt(argc, argv, "c:D:h:l:Lm:n:Prs:T:t:uU:v:V:x:?")) != EOF) { ++ while ((c = getopt(argc, argv, "c:D:h:l:Lm:n:Prs:T:t:uU:v:V:x:y?")) != EOF) { + switch (c) { + + case 'c': /* config file */ +@@ -633,6 +634,10 @@ main(int argc, char **argv) + time(&rsc_start); + break; + ++ case 'y': ++ use_localtime = 1; ++ break; ++ + case '?': + default: + errflag++; +@@ -661,7 +666,8 @@ Options:\n\ + -v volsize switch log volumes after volsize has been accumulated\n\ + -V version version for archive (default and only version is 2)\n\ + -x fd control file descriptor for application launching pmlogger\n\ +- via pmRecordControl(3)\n", ++ via pmRecordControl(3)\n\ ++ -y set timezone for times to local time rather than that of PMCD host\n", + pmProgname); + exit(1); + } +@@ -817,7 +823,8 @@ Options:\n\ + strcpy(logctl.l_label.ill_tz, resp->vset[0]->vlist[0].value.pval->vbuf); + /* prefer to use remote time to avoid clock drift problems */ + epoch = resp->timestamp; /* struct assignment */ +- pmNewZone(logctl.l_label.ill_tz); ++ if (! use_localtime) ++ pmNewZone(logctl.l_label.ill_tz); + } + #ifdef PCP_DEBUG + else if (pmDebug & DBG_TRACE_LOG) { +diff -Naurp a/src/pmmgr/config/GNUmakefile b/src/pmmgr/config/GNUmakefile +--- a/src/pmmgr/config/GNUmakefile 2014-01-08 17:25:46.000000000 +1100 ++++ b/src/pmmgr/config/GNUmakefile 2014-02-26 14:34:37.417238128 +1100 +@@ -1,6 +1,6 @@ + #!gmake + # +-# Copyright (c) 2013 Red Hat. ++# Copyright (c) 2013-2014 Red Hat. + # + # This program is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by the +@@ -18,7 +18,7 @@ LLDIRT = + TOPDIR = ../../.. + include $(TOPDIR)/src/include/builddefs + +-LSRCFILES = pmie pmieconf pmlogconf pmlogger pmlogmerge \ ++LSRCFILES = pmie pmieconf pmlogconf pmlogger pmlogmerge pmlogmerge-rewrite pmlogmerge-granular \ + README target-discovery.example-avahi + + PMMGR_SYSCONF_DIR=$(PCP_SYSCONF_DIR)/pmmgr +diff -Naurp a/src/pmmgr/GNUmakefile b/src/pmmgr/GNUmakefile +--- a/src/pmmgr/GNUmakefile 2014-01-10 08:45:59.000000000 +1100 ++++ b/src/pmmgr/GNUmakefile 2014-02-26 14:34:37.552225230 +1100 +@@ -1,6 +1,6 @@ + #!gmake + # +-# Copyright (c) 2013 Red Hat. ++# Copyright (c) 2013-2014 Red Hat. + # + # This program is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by the +@@ -39,7 +39,7 @@ install: $(SUBDIRS) $(CXXMDTARGET) + $(INSTALL) -m 644 pmmgr.options $(PCP_PMMGROPTIONS_PATH) + $(INSTALL) -m 755 rc_pmmgr $(PCP_RC_DIR)/pmmgr + $(INSTALL) -m 755 $(CXXMDTARGET) $(PCP_BINADM_DIR)/$(CXXMDTARGET) +- $(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_USER) -d $(PCP_LOG_DIR)/pmmgr ++ $(INSTALL) -m 775 -o $(PCP_USER) -g $(PCP_GROUP) -d $(PCP_LOG_DIR)/pmmgr + else + build-me: + @echo not building pmmgr +diff -Naurp a/src/pmmgr/pmmgr.cxx b/src/pmmgr/pmmgr.cxx +--- a/src/pmmgr/pmmgr.cxx 2014-01-08 17:25:46.000000000 +1100 ++++ b/src/pmmgr/pmmgr.cxx 2014-02-26 14:34:37.559238008 +1100 +@@ -1,18 +1,20 @@ + /* + * Copyright (c) 2013-2014 Red Hat. +- * ++ * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. +- * ++ * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +- ++#ifndef _XOPEN_SOURCE ++#define _XOPEN_SOURCE 600 ++#endif + #include "pmmgr.h" + #include "impl.h" + +@@ -23,6 +25,8 @@ + #include + + extern "C" { ++#include ++#include + #include + #include + #ifdef HAVE_PTHREAD_H +@@ -40,6 +44,7 @@ using namespace std; + + + int quit; ++int polltime = 60; + + + // ------------------------------------------------------------------------ +@@ -76,7 +81,7 @@ timestamp(ostream &o) + if (now2) + now2[19] = '\0'; // overwrite \n + +- return o << "[" << (now2 ? now2 : "") << "] " << pmProgname << "(" ++ return o << "[" << (now2 ? now2 : "") << "] " << pmProgname << "(" + << getpid() + #ifdef HAVE_PTHREAD_H + #ifdef IS_LINUX +@@ -89,13 +94,6 @@ timestamp(ostream &o) + } + + +-extern "C" int +-pmValue_compare (const void* a, const void* b) +-{ +- return ((pmValue *)a)->inst - ((pmValue *)b)->inst; +-} +- +- + extern "C" void * + pmmgr_daemon_poll_thread (void* a) + { +@@ -105,6 +103,51 @@ pmmgr_daemon_poll_thread (void* a) + } + + ++// A wrapper for something like system(3), but responding quicker to ++// interrupts and standardizing tracing. ++int ++pmmgr_configurable::wrap_system(const std::string& cmd) ++{ ++ if (pmDebug & DBG_TRACE_APPL0) ++ timestamp(cout) << "running " << cmd << endl; ++ ++ int pid = fork(); ++ if (pid == 0) ++ { ++ // child ++ int rc = execl ("/bin/sh", "sh", "-c", cmd.c_str(), NULL); ++ timestamp(cerr) << "failed to execl sh -c " << cmd << " rc=" << rc << endl; ++ _exit (1); ++ } ++ else if (pid < 0) ++ { ++ // error ++ timestamp(cerr) << "fork for " << cmd << " failed: errno=" << errno << endl; ++ return -1; ++ } ++ else ++ { ++ // parent ++ int status = -1; ++ int rc; ++ //timestamp(cout) << "waiting for pid=" << pid << endl; ++ ++ do { rc = waitpid(pid, &status, 0); } while (!quit && rc == -1 && errno == EINTR); // TEMP_FAILURE_RETRY ++ if (quit) ++ { ++ // timestamp(cout) << "killing pid=" << pid << endl; ++ kill (pid, SIGTERM); // just to be on the safe side ++ // it might linger a few seconds in zombie mode ++ } ++ ++ //timestamp(cout) << "done status=" << status << endl; ++ if (status != 0) ++ timestamp(cerr) << "system(" << cmd << ") failed: rc=" << status << endl; ++ return status; ++ } ++} ++ ++ + + // ------------------------------------------------------------------------ + +@@ -255,15 +298,12 @@ pmmgr_job_spec::compute_hostid (const pc + continue; + // NB: after this point, 'continue' must also pmFreeResult(r) + ++ // in-place sort value list by indom number ++ pmSortInstances(r); ++ + // only vset[0] will be set, for csb->pmid + if (r->vset[0]->numval > 0) + { +- // in-place sort value list by indom number +- qsort (r->vset[0]->vlist, +- (size_t) r->vset[0]->numval, +- sizeof(pmValue), +- pmValue_compare); +- + for (int j=0; jvset[0]->numval; j++) // iterate over instances + { + // fetch the string value +@@ -273,7 +313,7 @@ pmmgr_job_spec::compute_hostid (const pc + PM_TYPE_STRING, & av, PM_TYPE_STRING); + if (rc < 0) + continue; +- ++ + // at last! we have a string we can accumulate + hostid_fields.push_back (av.cp); + free (av.cp); +@@ -356,10 +396,10 @@ pmmgr_job_spec::poll() + new_specs.insert(target_hosts[i]); + + vector target_discovery = get_config_multi("target-discovery"); +- for (unsigned i=0; i known_target_scores; + for (set::iterator it = new_specs.begin(); +- it != new_specs.end(); ++ it != new_specs.end() && !quit; + ++it) + { ++ struct timeval before, after; ++ __pmtimevalNow(& before); + pmmgr_hostid hostid = compute_hostid (*it); ++ __pmtimevalNow(& after); ++ double score = __pmtimevalSub(& after, & before); // the smaller, the preferreder ++ + if (hostid != "") // verified existence/liveness +- known_targets[hostid] = *it; +- // NB: for hostid's with multiple specs, this logic will pick an +- // *arbitrary* one. Perhaps we want to tie-break deterministically. ++ { ++ if (pmDebug & DBG_TRACE_APPL0) ++ timestamp(cout) << "hostid " << hostid << " via " << *it << " time " << score << endl; ++ ++ if (known_target_scores.find(hostid) == known_target_scores.end() || ++ known_target_scores[hostid] > score) // previous slower than this one ++ { ++ known_targets[hostid] = *it; ++ known_target_scores[hostid] = score; ++ } ++ } + } + + // phase 4a: compare old_known_targets vs. known_targets: look for any recently died +@@ -415,11 +469,11 @@ pmmgr_job_spec::poll() + // phase 5: poll all the live daemons + // NB: there is a parallelism opportunity, as running many pmlogconf/etc.'s in series + // is a possible bottleneck. +-#ifdef HAVE_PTHREAD_H ++#ifdef HAVE_PTHREAD_H + vector threads; + #endif + for (multimap::iterator it = daemons.begin(); +- it != daemons.end(); ++ it != daemons.end() && !quit; + ++it) + { + #ifdef HAVE_PTHREAD_H +@@ -468,7 +522,7 @@ pmmgr_job_spec::poll() + + glob_t the_blob; + string glob_pattern = log_dir + (char)__pmPathSeparator() + "*"; +- rc = glob (glob_pattern.c_str(), ++ rc = glob (glob_pattern.c_str(), + GLOB_NOESCAPE + #ifdef GLOB_ONLYDIR + | GLOB_ONLYDIR +@@ -476,10 +530,10 @@ pmmgr_job_spec::poll() + , NULL, & the_blob); + if (rc == 0) + { +- for (unsigned i=0; iWe've got one!!!!! + timestamp(cout) << "gc subdirectory " << item_name << endl; + string cleanup_cmd = "/bin/rm -rf " + sh_quote(item_name); +- if (pmDebug & DBG_TRACE_APPL0) +- timestamp(cout) << "running " << cleanup_cmd << endl; +- rc = system(cleanup_cmd.c_str()); +- if (rc != 0) +- timestamp(cerr) << "system(" << cleanup_cmd << ") failed: rc=" << rc << endl; ++ (void) wrap_system(cleanup_cmd); + } + } + } +@@ -546,18 +596,19 @@ pmmgr_job_spec::note_dead_hostid(const p + + + pmmgr_daemon::pmmgr_daemon(const std::string& config_directory, +- const pmmgr_hostid& hostid, ++ const pmmgr_hostid& hostid, + const pcp_context_spec& spec): + pmmgr_configurable(config_directory), + hostid(hostid), + spec(spec), +- pid(0) ++ pid(0), ++ last_restart_attempt(0) + { + } + + + pmmgr_pmlogger_daemon::pmmgr_pmlogger_daemon(const std::string& config_directory, +- const pmmgr_hostid& hostid, ++ const pmmgr_hostid& hostid, + const pcp_context_spec& spec): + pmmgr_daemon(config_directory, hostid, spec) + { +@@ -565,7 +616,7 @@ pmmgr_pmlogger_daemon::pmmgr_pmlogger_da + + + pmmgr_pmie_daemon::pmmgr_pmie_daemon(const std::string& config_directory, +- const pmmgr_hostid& hostid, ++ const pmmgr_hostid& hostid, + const pcp_context_spec& spec): + pmmgr_daemon(config_directory, hostid, spec) + { +@@ -596,7 +647,7 @@ void pmmgr_daemon::poll() + int rc = waitpid ((pid_t) pid, &ignored, WNOHANG); + + rc = kill ((pid_t) pid, 0); +- if (rc < 0) ++ if (rc < 0) + { + if (pmDebug & DBG_TRACE_APPL0) + timestamp(cout) << "daemon pid " << pid << " found dead" << endl; +@@ -607,7 +658,32 @@ void pmmgr_daemon::poll() + + if (pid == 0) // needs a restart + { +- string commandline = daemon_command_line(); ++ time_t now; ++ time (& now); ++ ++ // Prevent an error in the environment or the pmmgr daemon ++ // command lines from generating a tight loop of failure / ++ // retry, wasting time and log file space. Limit retry attempts ++ // to one per poll interval (pmmgr -p N parameter). ++ if (last_restart_attempt && (last_restart_attempt + polltime) >= now) ++ return; // quietly, without attempting to restart ++ ++ string commandline = daemon_command_line(); // <--- may take many seconds! ++ ++ // NB: Note this time as a restart attempt, even if daemon_command_line() ++ // returned an empty string, so that we don't try to restart it too soon. ++ // We note this time rather than the beginning of daemon_command_line(), ++ // to ensure at least polltime seconds of rest between attempts. ++ last_restart_attempt = now; ++ ++ if (quit) return; // without starting the daemon process ++ ++ if (commandline == "") // error in some intermediate processing stage ++ { ++ timestamp(cerr) << "failed to prepare daemon command line" << endl; ++ return; ++ } ++ + if (pmDebug & DBG_TRACE_APPL0) + timestamp(cout) << "fork/exec sh -c " << commandline << endl; + pid = fork(); +@@ -633,7 +709,7 @@ void pmmgr_daemon::poll() + } + + +-std::string ++std::string + pmmgr_pmlogger_daemon::daemon_command_line() + { + string default_log_dir = +@@ -648,7 +724,7 @@ pmmgr_pmlogger_daemon::daemon_command_li + (void) mkdir2 (host_log_dir.c_str(), 0777); + // (errors creating actual files under host_log_dir will be noted shortly) + +- string pmlogger_command = ++ string pmlogger_command = + string(pmGetConfig("PCP_BIN_DIR")) + (char)__pmPathSeparator() + "pmlogger"; + string pmlogger_options = sh_quote(pmlogger_command); + pmlogger_options += " " + get_config_single ("pmlogger"); +@@ -658,20 +734,17 @@ pmmgr_pmlogger_daemon::daemon_command_li + { + string pmlogconf_output_file = host_log_dir + (char)__pmPathSeparator() + "config.pmlogger"; + (void) unlink (pmlogconf_output_file.c_str()); +- string pmlogconf_command = ++ string pmlogconf_command = + string(pmGetConfig("PCP_BINADM_DIR")) + (char)__pmPathSeparator() + "pmlogconf"; +- string pmlogconf_options = ++ string pmlogconf_options = + sh_quote(pmlogconf_command) + + " -c -r -h " + sh_quote(spec) + + " " + get_config_single ("pmlogconf") + + " " + sh_quote(pmlogconf_output_file) + + " >/dev/null"; // pmlogconf is too chatty +- +- if (pmDebug & DBG_TRACE_APPL0) +- timestamp(cout) << "running " << pmlogconf_options << endl; +- int rc = system(pmlogconf_options.c_str()); +- if (rc != 0) +- timestamp(cerr) << "system(" << pmlogconf_options << ") failed: rc=" << rc << endl; ++ ++ int rc = wrap_system(pmlogconf_options); ++ if (rc) return ""; + + pmlogger_options += " -c " + sh_quote(pmlogconf_output_file); + } +@@ -688,61 +761,176 @@ pmmgr_pmlogger_daemon::daemon_command_li + // do log merging + if (get_config_exists ("pmlogmerge")) + { +- string pmlogextract_command = ++ string pmlogextract_command = + string(pmGetConfig("PCP_BIN_DIR")) + (char)__pmPathSeparator() + "pmlogextract"; + +- string pmlogcheck_command = ++ string pmlogcheck_command = + string(pmGetConfig("PCP_BIN_DIR")) + (char)__pmPathSeparator() + "pmlogcheck"; + ++ string pmlogrewrite_command = ++ string(pmGetConfig("PCP_BINADM_DIR")) + (char)__pmPathSeparator() + "pmlogrewrite"; ++ + string pmlogextract_options = sh_quote(pmlogextract_command); + + string retention = get_config_single ("pmlogmerge-retain"); + if (retention == "") retention = "14days"; ++ struct timeval retention_tv; ++ char *errmsg; ++ int rc = pmParseInterval(retention.c_str(), &retention_tv, &errmsg); ++ if (rc) ++ { ++ timestamp(cerr) << "pmlogmerge-retain '" << retention << "' parse error: " << errmsg << endl; ++ free (errmsg); ++ retention = "14days"; ++ retention_tv.tv_sec = 14*24*60*60; ++ retention_tv.tv_usec = 0; ++ } + pmlogextract_options += " -S -" + sh_quote(retention); + + // Arrange our new pmlogger to kill itself after the given + // period, to give us a chance to rerun. + string period = get_config_single ("pmlogmerge"); + if (period == "") period = "24hours"; +- pmlogger_options += " -s " + sh_quote(period); +- +- // Find prior archives by globbing for *.index files, +- // just like pmlogger_merge does +- vector old_archives; ++ struct timeval period_tv; ++ rc = pmParseInterval(period.c_str(), &period_tv, &errmsg); ++ if (rc) ++ { ++ timestamp(cerr) << "pmlogmerge '" << period << "' parse error: " << errmsg << endl; ++ free (errmsg); ++ period = "24hours"; ++ period_tv.tv_sec = 24*60*60; ++ period_tv.tv_usec = 0; ++ } ++ if (get_config_exists ("pmlogmerge-granular")) ++ { ++ // adjust stopping time to the next multiple of period ++ struct timeval now_tv; ++ __pmtimevalNow (&now_tv); ++ time_t period_s = period_tv.tv_sec; ++ if (period_s < 1) period_s = 1; // at least one second ++ time_t period_end = ((now_tv.tv_sec + period_s - 1) / period_s) * period_s; ++ period = string(" @") + ++ string(ctime(& period_end)).substr(0,24); // 24: ctime(3) magic value, sans \n ++ } ++ pmlogger_options += " -y -T " + sh_quote(period); // NB: pmmgr host local time! ++ ++ // Find prior archives by globbing for *.index files, ++ // just like pmlogger_merge does. ++ // Er ... but aren't .index files optional? ++ vector mergeable_archives; // those to merge + glob_t the_blob; + string glob_pattern = host_log_dir + (char)__pmPathSeparator() + "*.index"; +- int rc = glob (glob_pattern.c_str(), GLOB_NOESCAPE, NULL, & the_blob); ++ rc = glob (glob_pattern.c_str(), GLOB_NOESCAPE, NULL, & the_blob); + if (rc == 0) + { ++ // compute appropriate ++ struct timeval now_tv; ++ __pmtimevalNow (&now_tv); ++ time_t period_s = period_tv.tv_sec; ++ if (period_s < 1) period_s = 1; // at least one second ++ time_t prior_period_start = ((now_tv.tv_sec - period_s) / period_s) * period_s; ++ time_t prior_period_end = prior_period_start + period_s; ++ + for (unsigned i=0; i/dev/null"; + +- if (pmDebug & DBG_TRACE_APPL0) +- timestamp(cout) << "running " << pmlogcheck_options << endl; +- rc = system(pmlogcheck_options.c_str()); ++ rc = wrap_system(pmlogcheck_options); + if (rc != 0) + { +- timestamp(cerr) << "system(" << pmlogcheck_options << ") failed: rc=" << rc << endl; + timestamp(cerr) << "corrupt archive " << base_name << " preserved." << endl; + continue; + } + +- // XXX: pmlogrewrite here ++ if (quit) return ""; ++ ++ // In granular mode, skip if this file is too old or too new. NB: Decide ++ // based upon the log-label, not fstat timestamps, since files postdate ++ // the time region they cover. ++ if (get_config_exists ("pmlogmerge-granular")) ++ { ++ // One could do this the pmloglabel(1) __pmLog* way, ++ // rather than the pmlogsummary(1) PMAPI way. ++ ++ int ctx = pmNewContext(PM_CONTEXT_ARCHIVE, base_name.c_str()); ++ if (ctx < 0) ++ continue; // skip; gc later ++ ++ pmLogLabel label; ++ rc = pmGetArchiveLabel (& label); ++ if (rc < 0) ++ continue; // skip; gc later ++ ++ if (label.ll_start.tv_sec >= prior_period_end) // archive too new? ++ { ++ if (pmDebug & DBG_TRACE_APPL0) ++ timestamp(cout) << "skipping merge of too-new archive " << base_name << endl; ++ pmDestroyContext (ctx); ++ continue; ++ } ++ ++ struct timeval archive_end; ++ rc = pmGetArchiveEnd(&archive_end); ++ if (rc < 0) ++ { ++ pmDestroyContext (ctx); ++ continue; // skip; gc later ++ } ++ ++ if (archive_end.tv_sec < prior_period_start) // archive too old? ++ { ++ if (pmDebug & DBG_TRACE_APPL0) ++ timestamp(cout) << "skipping merge of too-old archive " << base_name << endl; ++ pmDestroyContext (ctx); ++ continue; // skip; gc later ++ } + +- old_archives.push_back (base_name); ++ pmDestroyContext (ctx); ++ // fallthrough: the archive intersects the prior_period_{start,end} interval ++ ++ // XXX: What happens for archives that span across granular periods? ++ } ++ ++ mergeable_archives.push_back (base_name); + } + globfree (& the_blob); + } + +- string timestr = "merged-archive"; ++ string timestr = "archive"; + time_t now2 = time(NULL); + struct tm *now = gmtime(& now2); + if (now != NULL) +@@ -754,42 +942,52 @@ pmmgr_pmlogger_daemon::daemon_command_li + } + string merged_archive_name = host_log_dir + (char)__pmPathSeparator() + timestr; + +- if (old_archives.size() > 1) // 1 or 0 are not worth merging! ++ if (mergeable_archives.size() > 1) // 1 or 0 are not worth merging! + { + // assemble final bits of pmlogextract command line: the inputs and the output +- for (unsigned i=0; i 0) +- timestr += timestr2; ++ timestr += timestr2; // no sh_quote required + } + + // last argument +@@ -810,7 +1008,7 @@ pmmgr_pmlogger_daemon::daemon_command_li + } + + +-std::string ++std::string + pmmgr_pmie_daemon::daemon_command_line() + { + string default_log_dir = +@@ -825,7 +1023,7 @@ pmmgr_pmie_daemon::daemon_command_line() + (void) mkdir2 (host_log_dir.c_str(), 0777); + // (errors creating actual files under host_log_dir will be noted shortly) + +- string pmie_command = ++ string pmie_command = + string(pmGetConfig("PCP_BIN_DIR")) + (char)__pmPathSeparator() + "pmie"; + string pmie_options = sh_quote (pmie_command); + +@@ -835,29 +1033,29 @@ pmmgr_pmie_daemon::daemon_command_line() + if (get_config_exists ("pmieconf")) + { + string pmieconf_output_file = host_log_dir + (char)__pmPathSeparator() + "config.pmie"; +- string pmieconf_command = ++ string pmieconf_command = + string(pmGetConfig("PCP_BIN_DIR")) + (char)__pmPathSeparator() + "pmieconf"; + + // NB: pmieconf doesn't take a host name as an argument, unlike pmlogconf +- string pmieconf_options = ++ string pmieconf_options = + sh_quote(pmieconf_command) + + " -F -c " + get_config_single ("pmieconf") + + " -f " + sh_quote(pmieconf_output_file); +- if (pmDebug & DBG_TRACE_APPL0) +- timestamp(cout) << "running " << pmieconf_options << endl; +- int rc = system(pmieconf_options.c_str()); +- if (rc != 0) +- timestamp(cerr) << "system(" << pmieconf_options << ") failed: rc=" << rc << endl; ++ ++ int rc = wrap_system(pmieconf_options.c_str()); ++ if (rc) return ""; + + pmie_options += "-c " + sh_quote(pmieconf_output_file); + } + ++ if (quit) return ""; ++ + // collect -h direction + pmie_options += " -h " + sh_quote(spec); + + // collect -f, to get it to run in the foreground, avoid setuid + pmie_options += " -f"; +- ++ + // collect subsidiary pmlogger diagnostics + pmie_options += " -l " + sh_quote(host_log_dir + (char)__pmPathSeparator() + "pmie.log"); + +@@ -876,10 +1074,10 @@ void handle_interrupt (int sig) + // recursive signals or whatnot, despite sa_mask in + // setup_signals()). + if (quit == 0) +- kill(-getpid(), sig); ++ kill(-getpid(), SIGTERM); + + quit ++; +- if (quit > 2) ++ if (quit > 3) // ignore 1 from user; 1 from kill(-getpid) above; 1 from same near main() exit + { + char msg[] = "Too many interrupts received, exiting.\n"; + int rc = write (2, msg, sizeof(msg)-1); +@@ -928,21 +1126,22 @@ void setup_signals() + + int main (int argc, char *argv[]) + { ++ /* Become our own process group, to assist signal passing to children. */ ++ setpgid(getpid(), 0); + __pmSetProgname(argv[0]); +- + setup_signals(); + +- string default_config_dir = ++ string default_config_dir = + string(pmGetConfig("PCP_SYSCONF_DIR")) + (char)__pmPathSeparator() + "pmmgr"; + vector js; + + int c; +- int polltime = 60; + char* username_str; + __pmGetUsername(& username_str); + string username = username_str; ++ char* output_filename = NULL; + +- while ((c = getopt(argc, argv, "D:c:vp:U:h")) != EOF) ++ while ((c = getopt(argc, argv, "D:c:vp:U:l:h")) != EOF) + { + switch (c) + { +@@ -950,13 +1149,17 @@ int main (int argc, char *argv[]) + (void) __pmParseDebug(optarg); + break; + ++ case 'l': ++ output_filename = optarg; ++ break; ++ + case 'v': + pmDebug |= DBG_TRACE_APPL0; + break; + + case 'p': + polltime = atoi(optarg); +- if (polltime <= 0) ++ if (polltime <= 0) + { + cerr << "Poll time too short." << endl; + exit(1); +@@ -994,8 +1197,34 @@ int main (int argc, char *argv[]) + // lose root privileges if we have them + __pmSetProcessIdentity(username.c_str()); + ++ // (re)create log file, redirect stdout/stderr ++ // NB: must be done after __pmSetProcessIdentity() for proper file permissions ++ if (output_filename) ++ { ++ int fd; ++ (void) unlink (output_filename); // in case one's left over from a previous other-uid run ++ fd = open (output_filename, O_WRONLY|O_APPEND|O_CREAT|O_TRUNC, 0666); ++ if (fd < 0) ++ timestamp(cerr) << "Cannot re-create logfile " << output_filename << endl; ++ else ++ { ++ int rc; ++ // Move the new file descriptors on top of stdout/stderr ++ rc = dup2 (fd, STDOUT_FILENO); ++ if (rc < 0) // rather unlikely ++ timestamp(cerr) << "Cannot redirect logfile to stdout" << endl; ++ rc = dup2 (fd, STDERR_FILENO); ++ if (rc < 0) // rather unlikely ++ timestamp(cerr) << "Cannot redirect logfile to stderr" << endl; ++ rc = close (fd); ++ if (rc < 0) // rather unlikely ++ timestamp(cerr) << "Cannot close logfile fd" << endl; ++ } ++ ++ } ++ + timestamp(cout) << "Log started" << endl; +- while (1) ++ while (! quit) + { + // In this section, we must not fidget with SIGCHLD, due to use of system(3). + for (unsigned i=0; i pmmgr.log 2>&1 & ++ $PMMGR -l pmmgr.log $OPTS & + $RC_STATUS -v + + pmpost "start pmmgr from $pmprog" +diff -Naurp a/src/pmmgr/TODO b/src/pmmgr/TODO +--- a/src/pmmgr/TODO 2014-01-13 13:27:28.000000000 +1100 ++++ b/src/pmmgr/TODO 2014-02-26 14:34:37.593238086 +1100 +@@ -1,8 +1,12 @@ +-- pmlogrewrite +-- log aging without logmerge (which is high on I/O) ++- pmmgr.1 EXAMPLE CONFIGURATIONS ++- optionally delay pm*conf ++- pmlogreduce ++- log aging in background while new pmlogger's already running + - old log compression (until we get libpcp zlib or something) + - email error reporting? +-- test buildability on non-linux + - qa + - port to mingw? ++- port to cygwin? + - pmlogger/pmie .log rotation ++- pid->pid_t cleanup ++ diff --git a/SOURCES/bz987086.patch b/SOURCES/bz987086.patch new file mode 100644 index 0000000..5a8b2ee --- /dev/null +++ b/SOURCES/bz987086.patch @@ -0,0 +1,628 @@ +commit 66ce1d4adc73cbe18b2ffac9d95efd820cf3ca44 +Author: Nathan Scott +Date: Fri Feb 21 13:29:44 2014 +1100 + + Make test qa/750 deterministic, remove hard-wired hostname + +diff --git a/qa/750 b/qa/750 +index 1922722..94ac5ee 100755 +--- a/qa/750 ++++ b/qa/750 +@@ -29,8 +29,9 @@ trap "_rpm_cleanup" 0 1 2 3 15 + filter_pmval() + { + sed \ +- -e "s/\"$hostname\"/\"BUILDHOST\"/g" \ ++ -e "s/^ *\"$hostname\"/\"BUILDHOST\"/g" \ + -e 's/^ [0-9][0-9]* $/ TIMESTAMP /g' \ ++ -e "s/^host: $hostname$/host: HOST/g" \ + # end + } + +diff --git a/qa/750.out.1 b/qa/750.out.1 +index acdbe0b..cbfb16b 100644 +--- a/qa/750.out.1 ++++ b/qa/750.out.1 +@@ -3,7 +3,7 @@ Preparing RPM package + Installing qaplayer + + metric: rpm.arch +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -12,16 +12,16 @@ samples: 1 + "noarch" + + metric: rpm.buildhost +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 + + qaplayer +- "BUILDHOST" ++"BUILDHOST" + + metric: rpm.buildtime +-host: smash ++host: HOST + semantics: instantaneous value + units: sec + samples: 1 +@@ -30,7 +30,7 @@ samples: 1 + TIMESTAMP + + metric: rpm.description +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -43,7 +43,7 @@ oversampling. This leads to sound quality that + cannot be equaled with more mundane software..." + + metric: rpm.epoch +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -52,7 +52,7 @@ samples: 1 + 0 + + metric: rpm.group +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -61,7 +61,7 @@ samples: 1 + "Applications/Sound" + + metric: rpm.installtime +-host: smash ++host: HOST + semantics: instantaneous value + units: sec + samples: 1 +@@ -70,7 +70,7 @@ samples: 1 + TIMESTAMP + + metric: rpm.license +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -79,7 +79,7 @@ samples: 1 + "GPL" + + metric: rpm.packager +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -88,7 +88,7 @@ samples: 1 + "Santa Claus " + + metric: rpm.release +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -97,7 +97,7 @@ samples: 1 + "1" + + metric: rpm.size +-host: smash ++host: HOST + semantics: instantaneous value + units: byte + samples: 1 +@@ -106,7 +106,7 @@ samples: 1 + 0 + + metric: rpm.sourcerpm +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -115,7 +115,7 @@ samples: 1 + "qaplayer-1.0-1.src.rpm" + + metric: rpm.summary +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -124,7 +124,7 @@ samples: 1 + "A QA player app that rocks!" + + metric: rpm.url +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -133,7 +133,7 @@ samples: 1 + "http://www.gnomovision.com/qaplayer/qaplayer.html" + + metric: rpm.vendor +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -142,7 +142,7 @@ samples: 1 + "White Socks Software, Inc." + + metric: rpm.version +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +diff --git a/qa/750.out.2 b/qa/750.out.2 +index ce6efac..a7b082d 100644 +--- a/qa/750.out.2 ++++ b/qa/750.out.2 +@@ -3,7 +3,7 @@ Preparing RPM package + Installing qaplayer + + metric: rpm.arch +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -12,16 +12,16 @@ qaplayer-1.0-1.noarch + "noarch" + + metric: rpm.buildhost +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 + + qaplayer-1.0-1.noarch +- "BUILDHOST" ++"BUILDHOST" + + metric: rpm.buildtime +-host: smash ++host: HOST + semantics: instantaneous value + units: sec + samples: 1 +@@ -31,7 +31,7 @@ qaplayer-1. + TIMESTAMP + + metric: rpm.description +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -44,7 +44,7 @@ oversampling. This leads to sound quality that + cannot be equaled with more mundane software..." + + metric: rpm.epoch +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -54,7 +54,7 @@ qaplayer-1. + 0 + + metric: rpm.group +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -63,7 +63,7 @@ qaplayer-1.0-1.noarch + "Applications/Sound" + + metric: rpm.installtime +-host: smash ++host: HOST + semantics: instantaneous value + units: sec + samples: 1 +@@ -73,7 +73,7 @@ qaplayer-1. + TIMESTAMP + + metric: rpm.license +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -82,7 +82,7 @@ qaplayer-1.0-1.noarch + "GPL" + + metric: rpm.packager +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -91,7 +91,7 @@ qaplayer-1.0-1.noarch + "Santa Claus " + + metric: rpm.release +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -100,7 +100,7 @@ qaplayer-1.0-1.noarch + "1" + + metric: rpm.size +-host: smash ++host: HOST + semantics: instantaneous value + units: byte + samples: 1 +@@ -110,7 +110,7 @@ qaplayer-1. + 0 + + metric: rpm.sourcerpm +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -119,7 +119,7 @@ qaplayer-1.0-1.noarch + "qaplayer-1.0-1.src.rpm" + + metric: rpm.summary +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -128,7 +128,7 @@ qaplayer-1.0-1.noarch + "A QA player app that rocks!" + + metric: rpm.url +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -137,7 +137,7 @@ qaplayer-1.0-1.noarch + "http://www.gnomovision.com/qaplayer/qaplayer.html" + + metric: rpm.vendor +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -146,7 +146,7 @@ qaplayer-1.0-1.noarch + "White Socks Software, Inc." + + metric: rpm.version +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +@@ -155,7 +155,7 @@ qaplayer-1.0-1.noarch + "1.0" + + metric: rpm.name +-host: smash ++host: HOST + semantics: instantaneous value + units: none + samples: 1 +commit 13a5562e18910ecffaba5b60f3b7adc5a01d7e56 +Author: Nathan Scott +Date: Fri Feb 21 14:11:51 2014 +1100 + + Extend qa/003 filter for non-x86 hosts, with less cpuinfo + +diff --git a/qa/003 b/qa/003 +index e0cffa7..b83a63f 100755 +--- a/qa/003 ++++ b/qa/003 +@@ -54,6 +54,7 @@ linux_filter() + sed \ + -e "/filesys\.readonly: $unknown/d" \ + -e "/hinv\.nlv: $unavailable/d" \ ++ -e "/hinv\.cpu\..*: $unavailable/d" \ + -e "/kernel\.pernode..*: $unavailable/d" \ + -e "/mem\.util\.active_anon: $unavailable/d" \ + -e "/mem\.util\.active_file: $unavailable/d" \ +commit ec0ab978a71c12d9ce14d2a1ad51eb944e3e0e7d +Author: Nathan Scott +Date: Wed Feb 19 13:22:02 2014 +1100 + + Improvements to the gluster filesystem PMDA + + Add a few missing filesystem operations to pmdagluster. + Introduce exception handling such that if new operations + appear unexpectedly, we handle this gracefully. + + Improve the handling of multiple profiled volumes also. + + Resolves Red Hat bug #1066544. + +diff --git a/src/pmdas/gluster/pmdagluster.python b/src/pmdas/gluster/pmdagluster.python +index 82277c2..de42e0c 100644 +--- a/src/pmdas/gluster/pmdagluster.python ++++ b/src/pmdas/gluster/pmdagluster.python +@@ -2,7 +2,7 @@ + Performance Metrics Domain Agent exporting Gluster filesystem metrics. + ''' + # +-# Copyright (c) 2013 Red Hat. ++# Copyright (c) 2013-2014 Red Hat. + # + # This program is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by the +@@ -36,7 +36,8 @@ FILEOPS = [ # append only, do not change the order (changes PMID) + 'MKNOD', 'OPEN', 'OPENDIR', 'RCHECKSUM', 'READDIR', 'READDIRP', + 'READLINK', 'READV', 'REMOVEXATTR', 'RENAME', 'RMDIR', 'SETATTR', + 'SETXATTR', 'STAT', 'STATFS', 'SYMLINK', 'TRUNCATE', 'UNLINK', +- 'WRITEV', 'XATTROP', ++ 'WRITEV', 'XATTROP', 'READ', 'WRITE', 'RELEASE', 'RELEASEDIR', ++ 'FORGET' + ] + FILEOPS_INDICES = {} + +@@ -89,17 +90,20 @@ class GlusterPMDA(PMDA): + + def parseVolumeInfo(self, xml): + ''' Extract the set of volume names from given gluster XML string ''' +- volumes = [] +- for volxml in xml.findall('volInfo/volumes'): +- volname = volxml.find('volume/name').text +- volumes.append(volname) ++ volumenames = [] ++ volsxml = xml.find('volInfo/volumes') ++ if volsxml == None: ++ return volumenames ++ for volxml in volsxml.findall('volume'): ++ volname = volxml.find('name').text ++ volumenames.append(volname) + volume = GlusterVolume() +- volume.distCount = int(volxml.find('volume/distCount').text) +- volume.stripeCount = int(volxml.find('volume/stripeCount').text) +- volume.replicaCount = int(volxml.find('volume/replicaCount').text) ++ volume.distCount = int(volxml.find('distCount').text) ++ volume.stripeCount = int(volxml.find('stripeCount').text) ++ volume.replicaCount = int(volxml.find('replicaCount').text) + volume.fopHitsEnabled = 0 + volume.latencyEnabled = 0 +- for option in volxml.findall('volume/options/option'): ++ for option in volxml.findall('options/option'): + name = option.find('name').text + value = option.find('value').text + if (name == 'diagnostics.count-fop-hits' and value == 'on'): +@@ -107,7 +111,7 @@ class GlusterPMDA(PMDA): + if (name == 'diagnostics.latency-measurement' and value == 'on'): + volume.latencyEnabled = 1 + self.volumes[volname] = volume # prepare the volume indom cache +- return volumes ++ return volumenames + + def parseVolumeProfileInfo(self, volume, xml): + ''' Extract the metric values from a given gluster profile string ''' +@@ -116,11 +120,16 @@ class GlusterPMDA(PMDA): + brick = GlusterBrick() + for fileop in brickxml.findall('cumulativeStats/fopStats/fop'): + name = fileop.find('name').text +- fop = FILEOPS_INDICES[name] +- brick.count[fop] = long(fileop.find('hits').text) +- brick.avgtime[fop] = float(fileop.find('avgLatency').text) +- brick.mintime[fop] = long(float(fileop.find('minLatency').text)) +- brick.maxtime[fop] = long(float(fileop.find('maxLatency').text)) ++ try: ++ fop = FILEOPS_INDICES[name] ++ except KeyError: ++ # self.log('Unrecognised fileops key %s' % name) ++ pass ++ else: ++ brick.count[fop] = long(fileop.find('hits').text) ++ brick.avgtime[fop] = float(fileop.find('avgLatency').text) ++ brick.mintime[fop] = long(float(fileop.find('minLatency').text)) ++ brick.maxtime[fop] = long(float(fileop.find('maxLatency').text)) + brick.read_bytes = long(brickxml.find('cumulativeStats/totalRead').text) + brick.write_bytes = long(brickxml.find('cumulativeStats/totalWrite').text) + self.bricks[brickname] = brick # prepare the bricks indom cache +commit 3428c59e7f2e2bdd25e1f6d5b899a853f6845553 +Author: Nathan Scott +Date: Fri Feb 21 14:26:50 2014 +1100 + + Do not attempt to run NSS tests affected by bz 1035509 + +diff --git a/qa/common.secure b/qa/common.secure +index e3ee6a6..b9e936a 100644 +--- a/qa/common.secure ++++ b/qa/common.secure +@@ -29,6 +29,11 @@ nss_notrun_checks() + [ "$secure_sockets" = "true" ] || _notrun "Secure sockets not supported" + which certutil >/dev/null 2>&1 || _notrun "certutil not installed (NSS tools)" + [ -c /dev/urandom ] || _notrun "No random number generator special file found" ++ ++ fips=false # testing for exposure to Red Hat bug 1035509 ++ fipsfile=/proc/sys/crypto/fips_enabled ++ test -f $fipsfile -a `cat $fipsfile` -ne 0 && fips=true ++ $fips && _notrun "FIPS mode interacts badly with system NSS databases" + } + + nss_cleanup() +commit 2633a9948658a7fb0236a4740dc30b6c0193c91e +Author: Nathan Scott +Date: Fri Feb 21 14:31:55 2014 +1100 + + Resolve timezone handling bugs in python wrapper API + + We were incorrectly changing the context when asked to change + the timezone, this nullifying the zone change, and in one sad + location even calling the wrong PMAPI routine (hohum). Fixed + those, then extended qa/737 to cover pmWhichZone use as well. + + Problem found by the Red Hat testing folks using test qa/737. + +diff --git a/qa/737 b/qa/737 +index 17d6c18..6abdc49 100755 +--- a/qa/737 ++++ b/qa/737 +@@ -20,8 +20,13 @@ status=1 # failure is the default! + $sudo rm -rf $tmp.* $seq.full + trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15 + ++_filter_utc() ++{ ++ sed -e 's/UTC+0/UTC/g' -e 's/UTC-0/UTC/g' ++} ++ + # real QA test starts here +-python src/test_pcp_time.python ++python src/test_pcp_time.python | _filter_utc + + # success, all done + status=0 +diff --git a/qa/737.out b/qa/737.out +index 6a12e50..4f59a92 100644 +--- a/qa/737.out ++++ b/qa/737.out +@@ -1,5 +1,6 @@ + QA output created by 737 +-pmLocaltime from int: 1388763979.0 (2014, 1, 3, 15, 46, 19, 1, 33, 0) +-pmLocaltime from float: 1388763979.0 (2014, 1, 3, 15, 46, 19, 1, 33, 0) +-pmCtime from int: Mon Feb 3 15:46:19 2014 +-pmCtime from float: Mon Feb 3 15:46:19 2014 ++pmLocaltime from int: 1388724379.0 (2014, 1, 3, 4, 46, 19, 1, 33, 0) ++pmLocaltime from float: 1388724379.0 (2014, 1, 3, 4, 46, 19, 1, 33, 0) ++pmCtime from int: Mon Feb 3 04:46:19 2014 ++pmCtime from float: Mon Feb 3 04:46:19 2014 ++pmWhichZone: UTC +diff --git a/qa/src/test_pcp_time.python b/qa/src/test_pcp_time.python +index 49680c5..a36baaa 100755 +--- a/qa/src/test_pcp_time.python ++++ b/qa/src/test_pcp_time.python +@@ -29,3 +29,5 @@ print "pmLocaltime from float: ", context.pmLocaltime(sample_time_f) + + print "pmCtime from int: ", context.pmCtime(sample_time_i), + print "pmCtime from float: ", context.pmCtime(sample_time_f), ++ ++print "pmWhichZone: ", context.pmWhichZone() +diff --git a/src/python/pcp/pmapi.py b/src/python/pcp/pmapi.py +index 72302b4..fd67a9e 100644 +--- a/src/python/pcp/pmapi.py ++++ b/src/python/pcp/pmapi.py +@@ -1,7 +1,7 @@ + # pylint: disable=C0103 + """ Wrapper module for LIBPCP - the core Performace Co-Pilot API + # +-# Copyright (C) 2012-2013 Red Hat ++# Copyright (C) 2012-2014 Red Hat + # Copyright (C) 2009-2012 Michael T. Werner + # + # This file is part of the "pcp" module, the python interfaces for the +@@ -1123,32 +1123,32 @@ class pmContext(object): + raise pmErr, status + return status + +- def pmNewZone(self, tz): ++ @staticmethod ++ def pmNewZone(tz): + """PMAPI - Create new zone handle and set reporting timezone """ +- status = LIBPCP.pmUseContext(self.ctx) +- if status < 0: +- raise pmErr, status +- status = LIBPCP.pmNewContextZone(tz) ++ status = LIBPCP.pmNewZone(tz) + if status < 0: + raise pmErr, status + return status + +- def pmUseZone(self, tz_handle): ++ @staticmethod ++ def pmUseZone(tz_handle): + """PMAPI - Sets the current reporting timezone """ +- status = LIBPCP.pmUseContext(self.ctx) +- if status < 0: +- raise pmErr, status + status = LIBPCP.pmUseZone(tz_handle) + if status < 0: + raise pmErr, status + return status + +- def pmWhichZone(self): ++ @staticmethod ++ def pmWhichZone(): + """PMAPI - Query the current reporting timezone """ +- status = LIBPCP.pmGetContextHostName(self.ctx) ++ tz_p = c_char_p() ++ status = LIBPCP.pmWhichZone(byref(tz_p)) + if status < 0: + raise pmErr, status +- return status ++ tz = str(tz_p.value) ++ LIBC.free(tz_p) ++ return tz + + def pmLocaltime(self, seconds): + """PMAPI - convert the date and time for a reporting timezone """ +commit 9681ff309d09de29fd92942f89b4405164b4d3f2 +Author: Nathan Scott +Date: Tue Feb 25 10:51:48 2014 +1100 + + Fix qa/749 when systemtap userspace probes are unavailable + + Tweak test 749 using Franks suggestion of verifying up to and + including the compilation phase (-p4) before going ahead with + the complete test. This is to catch missing userspace probe + support on some platforms (s390x tripped this in the Red Hat + QE environment). + +diff --git a/qa/749 b/qa/749 +index 9d2e16a..eb712f1 100644 +--- a/qa/749 ++++ b/qa/749 +@@ -2,7 +2,7 @@ + # PCP QA Test No. 749 + # Check pmcd static probes + # +-# Copyright (c) 2013 Red Hat. ++# Copyright (c) 2013-2014 Red Hat. + + seq=`basename $0` + echo "QA output created by $seq" +@@ -56,8 +56,19 @@ cat $tmp.stap >> $seq.full + echo "Running pmcd process:" >> $seq.full + $PCP_PS_PROG $PCP_PS_ALL_FLAGS | grep pmcd >> $seq.full + ++# check for stap user probing support ++stap -p4 $tmp.stap >$tmp.out 2>&1 ++if [ $? -ne 0 ] ++then ++ echo "Systemtap compile check failed" ++ cat $tmp.out >> $seq.full ++ _notrun "Systemtap userspace probing unsupported here" ++fi ++ + # start systemtap and count pmcd probe hits +-$sudo stap $tmp.stap | tee -a $tmp.out 2>&1 ++echo "Fire stap probes:" >> $seq.full ++$sudo stap $tmp.stap >$tmp.out 2>&1 ++cat $tmp.out | tee -a $seq.full + + echo "Output from stap:" >> $seq.full + cat $tmp.out >> $seq.full diff --git a/SPECS/pcp.spec b/SPECS/pcp.spec index 0280e53..a76cce5 100644 --- a/SPECS/pcp.spec +++ b/SPECS/pcp.spec @@ -1,7 +1,7 @@ Summary: System-level performance monitoring and performance management Name: pcp -Version: 3.8.6 -%define buildversion 2 +Version: 3.8.10 +%define buildversion 8 Release: %{buildversion}%{?dist} License: GPLv2+ and LGPLv2.1+ @@ -9,12 +9,34 @@ URL: http://oss.sgi.com/projects/pcp Group: Applications/System Source0: pcp-%{version}.src.tar.gz -Patch1: bz1027236.patch +# man pages for all of the PMDAs missing out (BZ 1053094) +Patch1: bz1053094.patch +# pmdalinux failure on unexpected ICMP types (BZ 1055826) +Patch2: bz1055826.patch +# ensure PMNS stdpmid files are installed (BZ 1059004) +Patch3: bz1059004.patch +# pmdammv induced pmcd segv during tests (BZ 1061330) +Patch4: bz1061330.patch +# python-pcp time API wrapper implementation (BZ 1062467) +Patch5: bz1062467.patch +# missing qualified output for newly added tests (BZ 1064311) +Patch6: bz1064311.patch +# PMDA install now works without a running pmcd (BZ 1062443) +Patch7: bz1062443.patch +# pmdalinux memory corruption issue on s390x (BZ 1064254) +Patch8: bz1064254.patch +# handful of QE-found test-induced failure fixes (BZ 987086) +Patch9: bz987086.patch +# multilib packaging support for libs and devel (BZ 1059642) +Patch10: bz1059642.patch +# update pmmgr to pcp 3.9.0+ level +Patch11: bz1067547.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: procps autoconf bison flex -BuildRequires: avahi-devel BuildRequires: nss-devel +BuildRequires: rpm-devel +BuildRequires: avahi-devel BuildRequires: python-devel BuildRequires: ncurses-devel BuildRequires: readline-devel @@ -80,6 +102,21 @@ the interesting performance data in a system, and allows client applications to easily retrieve and process any subset of that data. # +# pcp-conf +# +%package conf +License: LGPLv2+ +Group: Development/Libraries +Summary: Performance Co-Pilot run-time configuration +URL: http://oss.sgi.com/projects/pcp/ + +# http://fedoraproject.org/wiki/Packaging:Conflicts "Splitting Packages" +Conflicts: pcp-libs < 3.8.10-7 + +%description conf +Performance Co-Pilot (PCP) run-time configuration + +# # pcp-libs # %package libs @@ -88,6 +125,8 @@ Group: Development/Libraries Summary: Performance Co-Pilot run-time libraries URL: http://oss.sgi.com/projects/pcp/ +Requires: pcp-conf = %{version}-%{release} + %description libs Performance Co-Pilot (PCP) run-time libraries @@ -113,6 +152,7 @@ Group: Development/Libraries Summary: Performance Co-Pilot (PCP) test suite URL: http://oss.sgi.com/projects/pcp/ Requires: pcp = %{version}-%{release} +Requires: pcp-libs = %{version}-%{release} Requires: pcp-libs-devel = %{version}-%{release} %description testsuite @@ -282,14 +322,23 @@ building Performance Metric API (PMAPI) tools using Python. %prep %setup -q -%patch1 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 %clean rm -Rf $RPM_BUILD_ROOT %build -%configure --with-rcdir=%{_initddir} --with-tmpdir=%{_tempsdir} \ -%{?_with_doc} %{?_with_ib} +%configure --with-rcdir=%{_initddir} %{?_with_doc} %{?_with_ib} make default_pcp %install @@ -304,6 +353,9 @@ mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/run/pcp # remove sheet2pcp until BZ 830923 and BZ 754678 are resolved. rm -f $RPM_BUILD_ROOT/%{_bindir}/sheet2pcp $RPM_BUILD_ROOT/%{_mandir}/man1/sheet2pcp.1.gz +# remove configsz.h as this is not multilib friendly. +rm -f $RPM_BUILD_ROOT/%{_includedir}/pcp/configsz.h + %if %{disable_infiniband} # remove pmdainfiniband on platforms lacking IB devel packages. rm -f $RPM_BUILD_ROOT/%{_pmdasdir}/ib $RPM_BUILD_ROOT/man1/pmdaib.1.gz @@ -311,7 +363,7 @@ rm -fr $RPM_BUILD_ROOT/%{_pmdasdir}/infiniband %endif # default chkconfig off for Fedora and RHEL -for f in $RPM_BUILD_ROOT/%{_initddir}/{pcp,pmcd,pmlogger,pmie,pmwebd,pmproxy}; do +for f in $RPM_BUILD_ROOT/%{_initddir}/{pcp,pmcd,pmlogger,pmie,pmwebd,pmmgr,pmproxy}; do sed -i -e '/^# chkconfig/s/:.*$/: - 95 05/' -e '/^# Default-Start:/s/:.*$/:/' $f done @@ -330,13 +382,16 @@ sed -e 's#^#'%{_mandir}'\/man1\/#' >base_man1files.list cat base_pmdas.list base_binfiles.list base_man1files.list > base_specialfiles.list %pre testsuite +test -d %{_testsdir} || mkdir -p -m 755 %{_testsdir} getent group pcpqa >/dev/null || groupadd -r pcpqa getent passwd pcpqa >/dev/null || \ - useradd -c "PCP Quality Assurance" -g pcpqa -d %{_testsdir} -m -r -s /bin/bash pcpqa 2>/dev/null + useradd -c "PCP Quality Assurance" -g pcpqa -d %{_testsdir} -M -r -s /bin/bash pcpqa 2>/dev/null +chown -R pcpqa:pcpqa %{_testsdir} 2>/dev/null exit 0 %post testsuite chown -R pcpqa:pcpqa %{_testsdir} 2>/dev/null +chmod 755 %{_testsdir} 2>/dev/null exit 0 %pre @@ -391,21 +446,25 @@ exit 0 %preun if [ "$1" -eq 0 ] then - # - # Stop daemons before erasing the package - # + # stop daemons before erasing the package /sbin/service pmlogger stop >/dev/null 2>&1 /sbin/service pmie stop >/dev/null 2>&1 /sbin/service pmproxy stop >/dev/null 2>&1 /sbin/service pmwebd stop >/dev/null 2>&1 + /sbin/service pmmgr stop >/dev/null 2>&1 /sbin/service pmcd stop >/dev/null 2>&1 /sbin/chkconfig --del pcp >/dev/null 2>&1 /sbin/chkconfig --del pmcd >/dev/null 2>&1 /sbin/chkconfig --del pmlogger >/dev/null 2>&1 /sbin/chkconfig --del pmie >/dev/null 2>&1 + /sbin/chkconfig --del pmmgr >/dev/null 2>&1 /sbin/chkconfig --del pmwebd >/dev/null 2>&1 /sbin/chkconfig --del pmproxy >/dev/null 2>&1 + + # cleanup namespace state/flag, may still exist + PCP_PMNS_DIR=%{_pmnsdir} + rm -f "$PCP_PMNS_DIR/.NeedRebuild" >/dev/null 2>&1 fi %post @@ -442,16 +501,19 @@ done chown -R pcp:pcp %{_logsdir}/pmcd 2>/dev/null chown -R pcp:pcp %{_logsdir}/pmlogger 2>/dev/null chown -R pcp:pcp %{_logsdir}/pmie 2>/dev/null +chown -R pcp:pcp %{_logsdir}/pmmgr 2>/dev/null chown -R pcp:pcp %{_logsdir}/pmwebd 2>/dev/null chown -R pcp:pcp %{_logsdir}/pmproxy 2>/dev/null -# we only need this manual Rebuild as long as pmcd is condstart below -[ -f "$PCP_PMNS_DIR/root" ] || ( cd "$PCP_PMNS_DIR" && ./Rebuild -sud ) +touch "$PCP_PMNS_DIR/.NeedRebuild" +chmod 644 "$PCP_PMNS_DIR/.NeedRebuild" /sbin/chkconfig --add pmcd >/dev/null 2>&1 /sbin/service pmcd condrestart /sbin/chkconfig --add pmlogger >/dev/null 2>&1 /sbin/service pmlogger condrestart /sbin/chkconfig --add pmie >/dev/null 2>&1 /sbin/service pmie condrestart +/sbin/chkconfig --add pmmgr >/dev/null 2>&1 +/sbin/service pmmgr condrestart /sbin/chkconfig --add pmwebd >/dev/null 2>&1 /sbin/service pmwebd condrestart /sbin/chkconfig --add pmproxy >/dev/null 2>&1 @@ -475,7 +537,9 @@ chown -R pcp:pcp %{_logsdir}/pmproxy 2>/dev/null %dir %{_localstatedir}/lib/pcp %dir %{_localstatedir}/lib/pcp/config %dir %attr(0775,pcp,pcp) %{_localstatedir}/lib/pcp/config/pmda -%dir %attr(1777,root,root) %{_tempsdir} +%dir %attr(0775,pcp,pcp) %{_tempsdir} +%dir %attr(0775,pcp,pcp) %{_tempsdir}/pmie +%dir %attr(0775,pcp,pcp) %{_tempsdir}/pmlogger %{_libexecdir}/pcp %{_datadir}/pcp/lib @@ -490,6 +554,7 @@ chown -R pcp:pcp %{_logsdir}/pmproxy 2>/dev/null %{_initddir}/pmcd %{_initddir}/pmlogger %{_initddir}/pmie +%{_initddir}/pmmgr %{_initddir}/pmwebd %{_initddir}/pmproxy %{_mandir}/man5/* @@ -503,6 +568,7 @@ chown -R pcp:pcp %{_logsdir}/pmproxy 2>/dev/null %config(noreplace) %{_confdir}/pmcd/pmcd.conf %config(noreplace) %{_confdir}/pmcd/pmcd.options %config(noreplace) %{_confdir}/pmcd/rc.local +%config(noreplace) %{_confdir}/pmmgr/pmmgr.options %config(noreplace) %{_confdir}/pmwebd/pmwebd.options %config(noreplace) %{_confdir}/pmproxy/pmproxy.options %dir %attr(0775,pcp,pcp) %{_confdir}/pmie @@ -521,13 +587,17 @@ chown -R pcp:pcp %{_logsdir}/pmproxy 2>/dev/null %endif # ppc %endif -%files libs +%files conf %defattr(-,root,root) %dir %{_includedir}/pcp %{_includedir}/pcp/builddefs %{_includedir}/pcp/buildrules %config %{_sysconfdir}/pcp.conf + +%files libs +%defattr(-,root,root) + %{_libdir}/libpcp.so.3 %{_libdir}/libpcp_gui.so.2 %{_libdir}/libpcp_mmv.so.1 @@ -607,6 +677,47 @@ chown -R pcp:pcp %{_logsdir}/pmproxy 2>/dev/null %defattr(-,root,root) %changelog +* Wed Feb 26 2014 Nathan Scott - 3.8.10-8 +- Update pmmgr to pcp 3.9.0+ level (BZ 1067547) + +* Tue Feb 25 2014 Nathan Scott - 3.8.10-7 +- Fix a handful of QE-found test-induced failures (BZ 987086) +- Multilib packaging support for libs and devel (BZ 1059642) + +* Tue Feb 18 2014 Nathan Scott - 3.8.10-6 +- Added missing qualified output for test qa/844 (BZ 1064311) +- Fix pmdalinux memory corruption issue on s390x (BZ 1064254) +- PMDA installation works without a running pmcd (BZ 1062443) +- Fix some more issues in pcpqa account creation (BZ 1025688) + +* Mon Feb 10 2014 Nathan Scott - 3.8.10-5 +- Resolve pmdammv induced pmcd segv during tests (BZ 1061330) +- Fix python-pcp time API wrapper implementation (BZ 1062467) + +* Wed Jan 29 2014 Nathan Scott - 3.8.10-4 +- Ensure the PMNS stdpmid files are installed (BZ 1059004) + +* Fri Jan 24 2014 Daniel Mach - 3.8.10-3 +- Mass rebuild 2014-01-24 + +* Wed Jan 22 2014 Nathan Scott - 3.8.10-2 +- Fix pmdalinux failure on unexpected ICMP types (BZ 1055826) +- Add man pages for all of the PMDAs missing out (BZ 1053094) + +* Wed Jan 15 2014 Nathan Scott - 3.8.10-1 +- Add symbol-versioning for PCP shared libraries (BZ 1037771) +- Fix pmcd/Avahi interaction with multiple ports (BZ 1035513) +- Confine set of exported symbols from DSO PMDAs (BZ 1025694) +- Ensure pcpqa user created by pcp-testsuite rpm (BZ 1025688) +- Remove empty pmlogger configuration directory (BZ 1025599) +- Resolve warning messages from pcp rpm scripts (BZ 1025587) +- Remove world-writeable private temp directory (BZ 1025583) +- Tackle remaining failing pcp-testsuite cases (BZ 987086) +- Update to latest PCP sources. + +* Fri Dec 27 2013 Daniel Mach - 3.8.6-3 +- Mass rebuild 2013-12-27 + * Wed Nov 06 2013 Frank Ch. Eigler - 3.8.6-2 - BZ1027236: adapt to droppage of nss export ciphers