File: INSTALL

package info (click to toggle)
pcp 3.3.3-squeeze3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 14,452 kB
  • ctags: 9,608
  • sloc: ansic: 102,434; sh: 16,080; perl: 5,011; makefile: 2,275; yacc: 2,112; lex: 1,069; xml: 82; fortran: 60; java: 22; awk: 20
file content (217 lines) | stat: -rw-r--r-- 8,195 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
== INSTALL ==

A.1 Linux Installation (rpm, deb)
 .2 Mac OS X Installation
 .3 AIX Installation
 .4 Solaris Installation
 .5 Windows Installation
B. Building from source
C. Post-install steps

This document describes how to configure and build the open source PCP
("pcp") package from source, and how to install and finally run it.


== A.1 Linux Installation

If you are using Debian, or a Debian-based distribution like Ubuntu,
PCP is included in the distribution (as of late 2008).  Run:
	# apt-get install pcp
If you are using a RPM based distribution and have the binary rpm:
	# rpm -Uvh pcp-*.rpm
... and skip to the final section (below) - "Post-install steps".

Special note for Ubuntu 8.04, 8.10, 9.04, 9.10 and 10.04

I've had to make the changes below to /usr/bin/dpkg-buildpackage.
Without these two changes, my pcp builds produce bad binaries with a
bizarre array of failure modes!

#kenj# my $default_flags = defined $build_opts->{noopt} ? "-g -O0" : "-g
-O2";
my $default_flags = defined $build_opts->{noopt} ? "-g -O0" : "-g -O0";
my %flags = ( CPPFLAGS => '',
              CFLAGS   => $default_flags,
              CXXFLAGS => $default_flags,
              FFLAGS   => $default_flags,
              #kenj# LDFLAGS  => '-Wl,-Bsymbolic-functions',
              LDFLAGS  => '',
    );

Without these changes, we see QA failures for 039, 061, 072, 091, 135,
147 and 151 ... and the QA 166 goes into a loop until it fills up the
root filesystem.

-- Ken

== A.2 Mac OS X Installation

The only unusual step in installing PCP on Mac OS X is the additional
dependency on the developer tools (XCode package).  The specific need
PCP has is to have a C preprocessor available for managing the metric
namespace, which on Mac OS X is a frontend to gcc and not installed by
default.

Once this is installed, installing PCP from the DMG file is as simple
as clicking on the icon in a Finder window, and following the prompts
from the installer.


== A.3 AIX Installation

At this stage, noone is making available pre-built AIX packages.
A port to Solaris has been done, and merged, however - building from
the source is currently the only option.  The packaging work is also
begun on this platform (see the build/aix/ directory in the sources).


== A.4 Solaris Installation

At this stage, noone is making available pre-built Solaris binaries.
A port to Solaris has been done, and merged, however - building from
the source is currently the only option.  Packaging work is not begun
for PCP on Solaris at this stage.


== A.5 Windows Installation

Download the native Windows version of PCP from the PCP download
section.  There are two variants: .zip and .exe.  The latter is
a self-installing executable, the former a simple compressed PCP
image.  Run the executable, follow the prompts, and a Startup
Menu item with several PCP options will be available - standard
DOS shell or POSIX shell (with suitable environment setup), the
Perl CPAN configuration tool, links to documentation and online
PCP internet resources, and the pmchart utility.


== B. Building from source

1. Configure, build and install the package

   The pcp package uses autoconf/configure and expects a GNU build
   environment (your platform must at least have both autoconf and
   gmake). 

   If you just want to spin a .RPM, .DEB, .DMG, .EXE and/or tar
   file, use the Makepkgs script in the top level directory.
   This will configure and build the package for your platform and
   leave binary and src packages in the build/<pkg-type> directory.
   It will also leave binary and source tar file in the build/tar
   directory.

       $ ./Makepkgs -verbose

2. If you want to build the package and install it manually, use the
   following steps:

       $ make
       $ su root
       # make install

   Note 1: that there are so many "install" variants out there that we
   wrote our own script (see "install-sh" in the top level directory),
   which works on every platform supported by PCP.
   Note 2: the Windows build is particularly involved to setup, this
   is primarily due to build tools not being available by default on
   that platform.  See the PCP Glider scripts and notes in the pcpweb
   tree to configure your environment before attempting to build from
   source under Win32.


== C. Post-install steps

   You will need to start the PCP Collection Daemon (PMCD), as root:

   Linux, AIX, Solaris:
   # /etc/init.d/pcp start
   Mac OS X:
   /Library/StartupItems/pcp/pcp start
   Windows:
   $PCP_DIR/etc/pcp start

   Once you have started the PMCD daemon, you can list all performance
   metrics using the pminfo(1) command, E.g.

   # pminfo -fmdt   (you don't have to be root for this, but you may need to
		     type rehash so your shell finds the pminfo command).

   If you are writing scripts, you may find the output from pmprobe(1)
   easier to parse than that for pminfo(1). There are numerous other
   PCP client tools included.

   PCP can be configured to automatically log certain performance metrics
   for one or more hosts. The scripts to do this are documented in
   pmlogger_check(1). By default this facility is not enabled. If you want
   to use it, you need to

   # determine which metrics to log and how often you need them
   # edit /var/pcp/config/pmlogger/control
   # edit /var/pcp/config/pmlogger/config.default  (and any others in same dir)
   # as root, "crontab -e" and add something like:

   # -- typical PCP log management crontab entries
   # daily processing of pmlogger archives and pmie logs
   10      0       *       *       *       $PCP_BINADM_DIR/pmlogger_daily
   15      0       *       *       *       $PCP_BINADM_DIR/pmie_daily
   #
   # every 30 minutes, check pmlogger and pmie instances are running
   25,40   *       *       *       *       $PCP_BINADM_DIR/pmlogger_check
   5,55    *       *       *       *       $PCP_BINADM_DIR/pmie_check

   The pmie (Performance Metrics Interfence Engine) daemon is _not_
   configured to start by default. To enable it, you may want to (on
   Linux platforms with chkconfig).

   # su root
   # chkconfig pmie on
   # edit the pmie control file (usually below /var/pcp/config/pmie)
   # edit the config file (usually /var/pcp/config/pmie/config.default)
   # set up cron scripts similar to those for pmlogger (see above)


   Configure some optional Performance Metrics Domain Agents (PMDAs)

   The default installation gives you the metrics for cpu, per-process,
   file system, swap, network, disk, memory, interrupts, nfs/rpc and
   others. These metrics are handled using the platform PMDA - namely
   pmda_linux.so (Linux), pmda_darwin.dylib (Mac), or pmda_windows.dll
   (Windows). It also gives you the PMCD PMDA, which contains metrics
   that monitor PCP itself.

   There are many other optional PMDAs that you can configure, depending
   on which performance metrics you need to monitor, as follows:
   Note: $PCP_PMDAS_DIR is normally /var/pcp/pmdas, see pcp.conf(4).

   Web Server metrics

   # su root
   # cd $PCP_PMDAS_DIR/apache  (i.e. cd /var/pcp/pmdas/apache)
   # ./Install
   # Check everything is working OK
   # pminfo -fmdt apache

   Other PMDAs in the pcp package include:

     apache - monitor apache web server stats
     cisco - monitor Cisco router stats
     mailq - monitor the mail queue
     mounts - keep track of mounted file systems
     news - experimental ascii protocol
     process - keep an eye on critical processes/daemons
     roomtemp - monitor room temp (needs suitable probe)
     sendmail - monitor sendmail statistics
     shping - ping critical system services
     trace - for instrumenting arbitrary applications, see pmtrace(1)
     txmon - transaction and QOS monitoring
     news - monitor news traffic
     sample - for testing
     simple - example src code if you want to write a new PMDA
     trivial - even easier src code for a new PMDA.

   The procedure for configuring all of these is to change to the
   directory for the PMDA (usually below /var/lib/pcp/pmdas), and then
   run the ./Install script found therein. None of these PMDAs are
   configured by default - you choose the PMDAs you need and run the
   Install script.