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
|
'\" te
.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
.\" Copyright 2015 Joyent, Inc.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH PARGS 1 "Oct 5, 2015"
.SH NAME
pargs, penv, pauxv \- print process arguments, environment variables, or auxiliary
vector
.SH SYNOPSIS
.LP
.nf
\fBpargs\fR [\fB-aceFlx\fR] [\fIpid\fR | \fIcore\fR]...
\fBpauxv\fR [\fB-cF\fR] [\fIpid\fR | \fIcore\fR]...
\fBpenv\fR [\fB-cF\fR] [\fIpid\fR | \fIcore\fR]...
.fi
.SH DESCRIPTION
.LP
The \fBpargs\fR utility examines a target process or process core file and
prints arguments, environment variables and values, or the process auxiliary
vector.
.sp
.LP
\fBpargs\fR outputs unprintable characters as escaped octal in the format
\fB\e\fR\fIxxx\fR, unless the character is one of the characters specified in
the "\fBEscape Sequences\fR" section of \fBformats\fR(5), in which case the
character is printed as specified in that section.
.sp
.LP
\fBpargs\fR attempts to be sensitive to the locale of the target process. If
the target process and the \fBpargs\fR process do not share a common character
encoding, \fBpargs\fR attempts to employ the \fBiconv\fR(3C) facility to
generate a printable version of the extracted strings. In the event that such
a conversion is impossible, strings are displayed as 7-bit \fBASCII\fR.
.sp
.LP
The \fBpauxv\fR command is equivalent to running \fBpargs\fR with the
\fB-x\fR option.
.sp
.LP
The \fBpenv\fR command is equivalent to running \fBpargs\fR with the
\fB-e\fR option.
.SH OPTIONS
.LP
The following options are supported by \fBpargs\fR. Only the \fB-c\fR
and \fB-F\fR options are supported by \fBpauxv\fR and \fBpenv\fR:
.sp
.ne 2
.na
\fB\fB-a\fR\fR
.ad
.RS 6n
Prints process arguments as contained in \fBargv[]\fR (default).
.RE
.sp
.ne 2
.na
\fB\fB-c\fR\fR
.ad
.RS 6n
Treats strings in the target process as though they were encoded in 7-bit
\fBASCII\fR, regardless of the locale of the target. The use of \fBiconv\fR(3C)
is suppressed.
.RE
.sp
.ne 2
.na
\fB\fB-e\fR\fR
.ad
.RS 6n
Prints process environment variables and values as pointed at by the
\fB_environ\fR symbol or by \fBpr_envp\fR in \fB/proc/\fIpid\fR/psinfo\fR.
.RE
.sp
.ne 2
.na
\fB\fB-F\fR\fR
.ad
.RS 6n
Force. Grabs the target process even if another process has control.
.RE
.sp
.ne 2
.na
\fB\fB-l\fR\fR
.ad
.RS 6n
Displays the arguments as a single command line. The command line is printed in
a manner suitable for interpretation by \fB/bin/sh\fR. If the arguments contain
unprintable characters, or if the target process is in a different locale, a
warning message is displayed. The resulting command line might not be
interpreted correctly by \fB/bin/sh\fR.
.RE
.sp
.ne 2
.na
\fB\fB-x\fR\fR
.ad
.RS 6n
Prints process auxiliary vector.
.RE
.SH OPERANDS
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIpid\fR\fR
.ad
.RS 8n
Process \fBID\fR list.
.RE
.sp
.ne 2
.na
\fB\fIcore\fR\fR
.ad
.RS 8n
Process core file.
.RE
.SH USAGE
.LP
Caution should be exercised when using the \fB-F\fR flag. Imposing two
controlling processes on one victim process can lead to chaos. Safety is
assured only if the primary controlling process, typically a debugger, has
stopped the victim process and the primary controlling process is doing nothing
at the moment of application of the \fBproc\fR tool in question.
.SH EXIT STATUS
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 12n
Successful operation.
.RE
.sp
.ne 2
.na
\fBnon-zero\fR
.ad
.RS 12n
An error has occurred (such as no such process, permission denied, or invalid
option).
.RE
.SH FILES
.ne 2
.na
\fB\fB/proc/pid/*\fR\fR
.ad
.RS 15n
Process information and control files.
.RE
.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Evolving
.TE
.SH SEE ALSO
.LP
\fBproc\fR(1), \fBiconv\fR(3C), \fBproc\fR(4), \fBascii\fR(5),
\fBattributes\fR(5), \fBenviron\fR(5), \fBformats\fR(5)
|