summaryrefslogtreecommitdiff
path: root/man/man1/pmtrace.1
blob: 114f2e10aaad73db75ec68d221ec2344bf1d7beb (plain)
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
'\"macro stdmacro
.\"
.\" 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.
.\" 
.\"
.TH PMTRACE 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmtrace\f1 \- command line performance instrumentation
.\" literals use .B or \f3
.\" arguments use .I or \f2
.SH SYNOPSIS
\f3pmtrace\f1
[\f3-q\f1]
[\f3\-c\f1 \f2value\f1 | \f3\-e\f1 \f2command\f1 | \f3\-v\f1 \f2value\f1]
[\f3\-h\f1 \f2host\f1]
[\f3\-S\f1 \f2state\f1]
\f2tag\f1
.SH DESCRIPTION
.B pmtrace
provides a simple command line interface to the trace Performance Metrics Domain
Agent (PMDA) and the associated \f2pcp_trace\f1 library.
.PP
The default 
.B pmtrace
behavior is to provide point trace data to the trace PMDA, using the
.I tag
argument as the identifying name associated with each trace point.
The
.I tag
then becomes an instance identifier within the set of trace.point metrics.
.PP
The
.B \-e
option allows an arbitrary \f2command\f1 to be executed.
This \f2command\f1 will be measured as a transaction since it has well defined
start and end points.  The information is made available through the
trace.transact metrics.
.PP
Trace data can be sent to the trace PMDA running on
.IR host ,
rather than the localhost, using
the
.B \-h
option.
This overrides use of the environment variable
.BR PCP_TRACE_HOST .
.PP
The
.B \-q
option suppresses messages from a successful trace, so that
.B pmtrace
runs quietly.
.PP
The 
.B \-c
option allows an arbitrary counter \f2value\f1 to be exported through
the trace.count metrics, while the
.B \-v
option allows an arbitrary floating point \f2value\f1 to be exported through
the trace.observe metrics
.PP
The
.B \-S
option enables internal debugging and tracing.  The value of
.I state
is a bit-wise combination of debug flags as defined in
.BR pmtracestate (3),
and may be specified using the decimal or hexadecimal syntax prescribed
by
.BR strtol (3).
.PP
.SH ENVIRONMENT
Since
.B pmtrace
uses the \f2libpcp_trace\f1 library routines, the environment variables
\f3PCP_TRACE_HOST\f1, \f3PCP_TRACE_PORT\f1, and \f3PCP_TRACE_TIMEOUT\f1
are all honored.
Refer to
.BR pmdatrace (3)
for a detailed description of the semantics of each.
.SH FILES
.PD 0
.TP 10
.BI $PCP_DEMOS_DIR/trace/pmtrace.c
source code for
.B pmtrace
.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 pmcd (1),
.BR pmdatrace (1),
.BR pmprobe (1),
.BR PMAPI (3),
and
.BR pmdatrace (3).
.SH DIAGNOSTICS
All are generated on standard error and are intended to be self-explanatory.
.PP
The
.B pmtrace
exit status is always zero except when the
.B \-e
option is in use, in which case the exit status of \f2command\f1 is returned.