Move /var/svc/log to /var/log/svc
[unleashed/lotheac.git] / share / man / man8 / pmadm.8
blob7413d6bf4e8e2917039dc4e355faf17fac55170d
1 '\" te
2 .\"  Copyright 1989 AT&T Copyright (c) 1998, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH PMADM 8 "Nov 10, 1998"
7 .SH NAME
8 pmadm \- port monitor administration
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBpmadm\fR \fB-a\fR [\fB-p\fR \fIpmtag\fR | \fB-t\fR \fItype\fR] \fB-s\fR \fIsvctag\fR \fB-i\fR \fIid\fR \fB-m\fR \fIpmspecific\fR \fB-v\fR \fIver\fR
13      [\fB-f\fR xu]
14      [\fB-y\fR \fIcomment\fR] [\fB-z\fR \fI script\fR]
15 .fi
17 .LP
18 .nf
19 \fBpmadm\fR \fB-r\fR \fB-p\fR \fIpmtag\fR \fB-s\fR \fIsvctag\fR
20 .fi
22 .LP
23 .nf
24 \fBpmadm\fR \fB-e\fR \fB-p\fR \fIpmtag\fR \fB-s\fR \fIsvctag\fR
25 .fi
27 .LP
28 .nf
29 \fBpmadm\fR \fB-d\fR \fB-p\fR \fIpmtag\fR \fB-s\fR \fIsvctag\fR
30 .fi
32 .LP
33 .nf
34 \fBpmadm\fR \fB-l\fR [\fB-t\fR \fItype\fR | \fB-p\fR \fIpmtag\fR] [\fB-s\fR \fIsvctag\fR]
35 .fi
37 .LP
38 .nf
39 \fBpmadm\fR \fB-L\fR [\fB-t\fR \fItype\fR | \fB-p\fR \fIpmtag\fR] [\fB-s\fR \fIsvctag\fR]
40 .fi
42 .LP
43 .nf
44 \fBpmadm\fR \fB-g\fR \fB-p\fR \fIpmtag\fR \fB-s\fR \fIsvctag\fR [\fB-z\fR \fIscript\fR]
45 .fi
47 .LP
48 .nf
49 \fBpmadm\fR \fB-g\fR \fB-s\fR \fIsvctag\fR \fB-t\fR \fItype\fR \fB-z\fR \fIscript\fR
50 .fi
52 .SH DESCRIPTION
53 .sp
54 .LP
55 \fBpmadm\fR is the administrative command for the lower level of the Service
56 Access Facility hierarchy, that is, for service administration. A port may have
57 only one service associated with it although the same service may be available
58 through more than one port. In order to uniquely identify an instance of a
59 service, the \fBpmadm\fR command must identify both the port monitor or port
60 monitors through which the service is available (\fB-p\fR or \fB-t\fR) and the
61 service (\fB-s\fR). See .
62 .sp
63 .LP
64 \fBpmadm\fR performs the following functions:
65 .RS +4
66 .TP
67 .ie t \(bu
68 .el o
69 adds or removes a service
70 .RE
71 .RS +4
72 .TP
73 .ie t \(bu
74 .el o
75 enables or disables a service
76 .RE
77 .RS +4
78 .TP
79 .ie t \(bu
80 .el o
81 installs or replaces a per-service configuration script
82 .RE
83 .RS +4
84 .TP
85 .ie t \(bu
86 .el o
87 prints requested service information
88 .RE
89 .sp
90 .LP
91 Any user on the system may invoke \fBpmadm\fR to request service status
92 (\fB-l\fR or \fB-L\fR) or to print per-service configuration scripts (\fB-g\fR
93 without the \fB-z\fR option). \fBpmadm\fR with other options may be executed
94 only by a privileged user.
95 .SH OPTIONS
96 .sp
97 .LP
98 The following options are supported:
99 .sp
100 .ne 2
102 \fB\fB-a\fR\fR
104 .RS 17n
105 Add a service. \fBpmadm\fR adds an entry for the new service to the port
106 monitor's administrative file. Because of the complexity of the options and
107 arguments that follow the \fB-a\fR option, it may be convenient to use a
108 command script or the menu system to add services.
112 .ne 2
114 \fB\fB-d\fR\fR
116 .RS 17n
117 Disable a service. Add \fBx\fR to the flag field in the entry for the service
118 \fIsvctag\fR in the port monitor's administrative file. This is the entry used
119 by port monitor \fIpmtag\fR. See the \fB-f\fR option, below, for a description
120 of the flags available.
124 .ne 2
126 \fB\fB-e\fR\fR
128 .RS 17n
129 Enable a service. Remove \fBx\fR from the flag field in the entry for the
130 service \fIsvctag\fR in the port monitor administrative file. This is the entry
131 used by port monitor \fIpmtag\fR. See the \fB-f\fR option, below, for a
132 description of the flags available.
136 .ne 2
138 \fB\fB-f\fR \fBxu\fR\fR
140 .RS 17n
141 The \fB-f\fR option specifies one or both of the following two flags which are
142 then included in the flag field of the entry for the new service in the port
143 monitor's administrative file. If the \fB-f\fR option is not included, no flags
144 are set and the default conditions prevail. By default, a new service is
145 enabled and no \fButmpx\fR entry is created for it. An \fB-f\fR option without
146 a following argument is illegal.
148 .ne 2
150 \fB\fBx\fR\fR
152 .RS 5n
153 Do not enable the service \fIsvctag\fR available through port monitor
154 \fIpmtag\fR.
158 .ne 2
160 \fB\fBu\fR\fR
162 .RS 5n
163 Create a \fButmpx\fR entry for service \fIsvctag\fR available through port
164 monitor \fIpmtag\fR.
170 .ne 2
172 \fB\fB-g\fR\fR
174 .RS 17n
175 Print, install, or replace a per-service configuration script. The \fB-g\fR
176 option with a \fB-p\fR option and a \fB-s\fR option prints the per-service
177 configuration script for service \fIsvctag\fR available through port monitor
178 \fIpmtag\fR. The \fB-g\fR option with a \fB-p\fR option, a \fB-s\fR option, and
179 a \fB-z\fR option installs the per-service configuration script contained in
180 the file \fBscript\fR as the per-service configuration script for service
181 \fIsvctag\fR available through port monitor \fIpmtag\fR. The \fB-g\fR option
182 with a \fB- s\fR option, a \fB-t\fR option, and a \fB-z\fR option installs the
183 file \fBscript\fR as the per-service configuration script for service
184 \fIsvctag\fR available through any port monitor of type \fBtype\fR. Other
185 combinations of options with \fB-g\fR are invalid.
189 .ne 2
191 \fB\fB-i\fR\fI id\fR\fR
193 .RS 17n
194 \fBid\fR is the identity that is to be assigned to service \fIsvctag\fR when it
195 is started. \fBid\fR must be an entry in \fB/etc/passwd\fR.
199 .ne 2
201 \fB\fB-l\fR\fR
203 .RS 17n
204 The \fB-l\fR option requests service information. Used by itself and with the
205 options described below, it provides a filter for extracting information in
206 several different groupings.
208 .ne 2
210 \fB\fB-l\fR\fR
212 .RS 23n
213 By itself, the \fB-l\fR option lists all services on the system.
217 .ne 2
219 \fB\fB\fR\fB-l\fR\fB \fR\fB-p\fR\fB \fR\fIpmtag\fR\fR
221 .RS 23n
222 Lists all services available through port monitor \fIpmtag\fR.
226 .ne 2
228 \fB\fB\fR\fB-l\fR\fB \fR\fB-s\fR\fB \fR\fIsvctag\fR\fR
230 .RS 23n
231 Lists all services with tag \fIsvctag\fR.
235 .ne 2
237 \fB\fB\fR\fB-l\fR\fB \fR\fB-p\fR\fB \fR\fIpmtag\fR\fB-s\fR\fIsvctag\fR\fR
239 .RS 23n
240 Lists service \fIsvctag\fR.
244 .ne 2
246 \fB\fB\fR\fB-l\fR\fB \fR\fB-t\fR\fB \fR\fItype\fR\fR
248 .RS 23n
249 Lists all services available through port monitors of type \fBtype\fR.
253 .ne 2
255 \fB\fB\fR\fB-l\fR\fB \fR\fB-t\fR\fB \fR\fItype\fR\fB-s\fR\fIsvctag\fR\fR
257 .RS 23n
258 Lists all services with tag \fIsvctag\fR available through a port monitor of
259 type \fBtype\fR.
262 Other combinations of options with \fB-l\fR are invalid.
266 .ne 2
268 \fB\fB-L\fR\fR
270 .RS 17n
271 The \fB-L\fR option is identical to the \fB-l\fR option except that output is
272 printed in a condensed format.
276 .ne 2
278 \fB\fB-m\fR\fI pmspecific\fR\fR
280 .RS 17n
281 \fIpmspecific\fR is the port monitor-specific portion of the port monitor
282 administrative file entry for the service.
286 .ne 2
288 \fB\fB-p\fR\fI pmtag\fR\fR
290 .RS 17n
291 Specifies the tag associated with the port monitor through which a service
292 (specified as \fB\fR\fB-s\fR\fB \fR\fIsvctag\fR) is available.
296 .ne 2
298 \fB\fB-r\fR\fR
300 .RS 17n
301 Remove a service. When \fBpmadm\fR removes a service, the entry for the service
302 is removed from the port monitor's administrative file.
306 .ne 2
308 \fB\fB-s\fR\fI svctag\fR\fR
310 .RS 17n
311 Specifies the service tag associated with a given service. The service tag is
312 assigned by the system administrator and is part of the entry for the service
313 in the port monitor's administrative file.
317 .ne 2
319 \fB\fB-t\fR\fI type\fR\fR
321 .RS 17n
322 Specifies the port monitor type.
326 .ne 2
328 \fB\fB-v\fR\fI ver\fR\fR
330 .RS 17n
331 Specifies the version number of the port monitor administrative file. The
332 version number may be given as
334 .in +2
336 \fB-v\fR \fB\&'\fR\fIpmspec\fR \fB-V\fR
338 .in -2
341 where \fIpmspec\fR is the special administrative command for port monitor
342 \fIpmtag\fR. This special command is \fBttyadm\fR for \fBttymon\fR and
343 \fBnlsadmin\fR for \fBlisten\fR. The version stamp of the port monitor is known
344 by the command and is returned when \fIpmspec\fR is invoked with a \fB-V\fR
345 option.
349 .ne 2
351 \fB\fB-y\fR\fI comment\fR\fR
353 .RS 17n
354 Associate \fIcomment\fR with the service entry in the port monitor
355 administrative file.
359 .ne 2
361 \fB\fB-z\fR\fI script\fR\fR
363 .RS 17n
364 Used with the \fB-g\fR option to specify the name of the file that contains the
365 per-service configuration script. Modifying a configuration script is a
366 three-step procedure. First a copy of the existing script is made (\fB-g\fR
367 alone). Then the copy is edited. Finally, the copy is put in place over the
368 existing script (\fB-g\fR with \fB-z\fR).
373 Options that request information write the requested information to the
374 standard output. A request for information using the \fB-l\fR option prints
375 column headers and aligns the information under the appropriate headings. In
376 this format, a missing field is indicated by a hyphen. A request for
377 information in the condensed format using the \fB-L\fR option prints the
378 information in colon-separated fields; missing fields are indicated by two
379 successive colons. \fB#\fR is the comment character.
380 .SH EXAMPLES
382 \fBExample 1 \fRAdding a Service to a Port Monitor with the Tag \fBpmtag\fR
385 The following command adds a service to a port monitor with tag \fBpmtag\fR and
386 gives the service the tag \fBsvctag\fR. The port monitor-specific information
387 is generated by \fBspecpm\fR. The service defined by \fBsvctag\fR will be
388 invoked with identity \fBroot\fR.
391 .in +2
393 pmadm -a -p pmtag -s svctag -i root -m `specpm -a arg1 -b arg2`-v `specpm -V`
395 .in -2
399 \fBExample 2 \fRAdding a Service with Service Tab \fBsvctag\fR
402 The following command adds a service with service tag \fBsvctag\fR, identity
403 \fBguest\fR, and port monitor-specific information generated by \fBspecpm\fR to
404 all port monitors of type \fBtype\fR:
407 .in +2
409 pmadm -a -s svctag -i guest -t type -m `specpm -a arg1 -b arg2`-v `specpm -V`
411 .in -2
415 \fBExample 3 \fRRemoving a Service
418 The following command removes the service \fBsvctag\fR from port monitor
419 \fBpmtag\fR:
422 .in +2
424 pmadm -r -p pmtag -s svctag
426 .in -2
430 \fBExample 4 \fREnabling a Service
433 The following command enables the service \fBsvctag\fR available through port
434 monitor \fBpmtag\fR:
437 .in +2
439 pmadm -e -p pmtag -s svctag
441 .in -2
445 \fBExample 5 \fRDisabling a Service
448 The following command disables the service \fBsvctag\fR available through port
449 monitor \fBpmtag\fR:
452 .in +2
454 pmadm -d -p pmtag -s svctag
456 .in -2
460 \fBExample 6 \fRListing Status Information
463 The following command lists status information for all services:
466 .in +2
468 pmadm -l
470 .in -2
474 \fBExample 7 \fRListing Status Information
477 The following command lists status information for all services available
478 through the port monitor with tag \fBports\fR:
481 .in +2
483 pmadm -l -p ports
485 .in -2
489 \fBExample 8 \fRListing Status Information in Condensed Format
492 The following command lists the status information for all services available
493 through the port monitor with tag \fBports\fR in condensed format:
496 .in +2
498 pmadm -L -p ports
500 .in -2
504 \fBExample 9 \fRListing Status Information for All Services
507 List status information for all services available through port monitors of
508 type \fBlisten\fR:
511 .in +2
513 pmadm -l -t listen
515 .in -2
519 \fBExample 10 \fRPrinting the per-service Configuration
522 The following command prints the per-service configuration script associated
523 with the service \fBsvctag\fR available through port monitor \fBpmtag\fR:
526 .in +2
528 pmadm -g -p pmtag -s svctag
530 .in -2
533 .SH EXIT STATUS
536 The following exit values are returned:
538 .ne 2
540 \fB\fB0\fR\fR
542 .RS 6n
543 Successful operation.
547 .ne 2
549 \fB\fB>0\fR\fR
551 .RS 6n
552 Operation failed.
555 .SH FILES
557 .ne 2
559 \fB\fB/etc/saf/\fR\fIpmtag\fR\fB/_config\fR\fR
561 .RS 26n
566 .ne 2
568 \fB\fB/etc/saf/\fR\fIpmtag\fR\fB/\fR\fIsvctag\fR\fR
570 .RS 26n
575 .ne 2
577 \fB\fB/var/saf/\fR\fIpmtag\fR\fB/*\fR\fR
579 .RS 26n
583 .SH SEE ALSO
586 \fBsac\fR(8), \fBsacadm\fR(8), \fBdoconfig\fR(3NSL), \fBattributes\fR(5)