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 1M "Nov 10, 1998"
8 pmadm \- port monitor administration
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
14 [\fB-y\fR \fIcomment\fR] [\fB-z\fR \fI script\fR]
19 \fBpmadm\fR \fB-r\fR \fB-p\fR \fIpmtag\fR \fB-s\fR \fIsvctag\fR
24 \fBpmadm\fR \fB-e\fR \fB-p\fR \fIpmtag\fR \fB-s\fR \fIsvctag\fR
29 \fBpmadm\fR \fB-d\fR \fB-p\fR \fIpmtag\fR \fB-s\fR \fIsvctag\fR
34 \fBpmadm\fR \fB-l\fR [\fB-t\fR \fItype\fR | \fB-p\fR \fIpmtag\fR] [\fB-s\fR \fIsvctag\fR]
39 \fBpmadm\fR \fB-L\fR [\fB-t\fR \fItype\fR | \fB-p\fR \fIpmtag\fR] [\fB-s\fR \fIsvctag\fR]
44 \fBpmadm\fR \fB-g\fR \fB-p\fR \fIpmtag\fR \fB-s\fR \fIsvctag\fR [\fB-z\fR \fIscript\fR]
49 \fBpmadm\fR \fB-g\fR \fB-s\fR \fIsvctag\fR \fB-t\fR \fItype\fR \fB-z\fR \fIscript\fR
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 .
64 \fBpmadm\fR performs the following functions:
69 adds or removes a service
75 enables or disables a service
81 installs or replaces a per-service configuration script
87 prints requested service information
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.
98 The following options are supported:
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.
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.
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.
138 \fB\fB-f\fR \fBxu\fR\fR
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.
153 Do not enable the service \fIsvctag\fR available through port monitor
163 Create a \fButmpx\fR entry for service \fIsvctag\fR available through port
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.
191 \fB\fB-i\fR\fI id\fR\fR
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.
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.
213 By itself, the \fB-l\fR option lists all services on the system.
219 \fB\fB\fR\fB-l\fR\fB \fR\fB-p\fR\fB \fR\fIpmtag\fR\fR
222 Lists all services available through port monitor \fIpmtag\fR.
228 \fB\fB\fR\fB-l\fR\fB \fR\fB-s\fR\fB \fR\fIsvctag\fR\fR
231 Lists all services with tag \fIsvctag\fR.
237 \fB\fB\fR\fB-l\fR\fB \fR\fB-p\fR\fB \fR\fIpmtag\fR\fB-s\fR\fIsvctag\fR\fR
240 Lists service \fIsvctag\fR.
246 \fB\fB\fR\fB-l\fR\fB \fR\fB-t\fR\fB \fR\fItype\fR\fR
249 Lists all services available through port monitors of type \fBtype\fR.
255 \fB\fB\fR\fB-l\fR\fB \fR\fB-t\fR\fB \fR\fItype\fR\fB-s\fR\fIsvctag\fR\fR
258 Lists all services with tag \fIsvctag\fR available through a port monitor of
262 Other combinations of options with \fB-l\fR are invalid.
271 The \fB-L\fR option is identical to the \fB-l\fR option except that output is
272 printed in a condensed format.
278 \fB\fB-m\fR\fI pmspecific\fR\fR
281 \fIpmspecific\fR is the port monitor-specific portion of the port monitor
282 administrative file entry for the service.
288 \fB\fB-p\fR\fI pmtag\fR\fR
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.
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.
308 \fB\fB-s\fR\fI svctag\fR\fR
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.
319 \fB\fB-t\fR\fI type\fR\fR
322 Specifies the port monitor type.
328 \fB\fB-v\fR\fI ver\fR\fR
331 Specifies the version number of the port monitor administrative file. The
332 version number may be given as
336 \fB-v\fR \fB\&'\fR\fIpmspec\fR \fB-V\fR
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
351 \fB\fB-y\fR\fI comment\fR\fR
354 Associate \fIcomment\fR with the service entry in the port monitor
361 \fB\fB-z\fR\fI script\fR\fR
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.
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.
393 pmadm -a -p pmtag -s svctag -i root -m `specpm -a arg1 -b arg2`-v `specpm -V`
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:
409 pmadm -a -s svctag -i guest -t type -m `specpm -a arg1 -b arg2`-v `specpm -V`
415 \fBExample 3 \fRRemoving a Service
418 The following command removes the service \fBsvctag\fR from port monitor
424 pmadm -r -p pmtag -s svctag
430 \fBExample 4 \fREnabling a Service
433 The following command enables the service \fBsvctag\fR available through port
439 pmadm -e -p pmtag -s svctag
445 \fBExample 5 \fRDisabling a Service
448 The following command disables the service \fBsvctag\fR available through port
454 pmadm -d -p pmtag -s svctag
460 \fBExample 6 \fRListing Status Information
463 The following command lists status information for all services:
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:
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:
504 \fBExample 9 \fRListing Status Information for All Services
507 List status information for all services available through port monitors of
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:
528 pmadm -g -p pmtag -s svctag
536 The following exit values are returned:
543 Successful operation.
559 \fB\fB/etc/saf/\fR\fIpmtag\fR\fB/_config\fR\fR
568 \fB\fB/etc/saf/\fR\fIpmtag\fR\fB/\fR\fIsvctag\fR\fR
577 \fB\fB/var/saf/\fR\fIpmtag\fR\fB/*\fR\fR
586 \fBsac\fR(1M), \fBsacadm\fR(1M), \fBdoconfig\fR(3NSL), \fBattributes\fR(5)