1pmadm(1M) System Administration Commands pmadm(1M)
2
3
4
6 pmadm - port monitor administration
7
9 pmadm -a [-p pmtag | -t type] -s svctag -i id -m pmspecific -v ver
10 [-f xu]
11 [-y comment] [-z script]
12
13
14 pmadm -r -p pmtag -s svctag
15
16
17 pmadm -e -p pmtag -s svctag
18
19
20 pmadm -d -p pmtag -s svctag
21
22
23 pmadm -l [-t type | -p pmtag] [-s svctag]
24
25
26 pmadm -L [-t type | -p pmtag] [-s svctag]
27
28
29 pmadm -g -p pmtag -s svctag [-z script]
30
31
32 pmadm -g -s svctag -t type -z script
33
34
36 pmadm is the administrative command for the lower level of the Service
37 Access Facility hierarchy, that is, for service administration. A port
38 may have only one service associated with it although the same service
39 may be available through more than one port. In order to uniquely iden‐
40 tify an instance of a service, the pmadm command must identify both the
41 port monitor or port monitors through which the service is available
42 (-p or -t) and the service (-s). See .
43
44
45 pmadm performs the following functions:
46
47 o adds or removes a service
48
49 o enables or disables a service
50
51 o installs or replaces a per-service configuration script
52
53 o prints requested service information
54
55
56 Any user on the system may invoke pmadm to request service status (-l
57 or -L) or to print per-service configuration scripts (-g without the -z
58 option). pmadm with other options may be executed only by a privileged
59 user.
60
62 The following options are supported:
63
64 -a Add a service. pmadm adds an entry for the new service
65 to the port monitor's administrative file. Because of
66 the complexity of the options and arguments that fol‐
67 low the -a option, it may be convenient to use a com‐
68 mand script or the menu system to add services.
69
70
71 -d Disable a service. Add x to the flag field in the
72 entry for the service svctag in the port monitor's
73 administrative file. This is the entry used by port
74 monitor pmtag. See the -f option, below, for a
75 description of the flags available.
76
77
78 -e Enable a service. Remove x from the flag field in the
79 entry for the service svctag in the port monitor
80 administrative file. This is the entry used by port
81 monitor pmtag. See the -f option, below, for a
82 description of the flags available.
83
84
85 -f xu The -f option specifies one or both of the following
86 two flags which are then included in the flag field of
87 the entry for the new service in the port monitor's
88 administrative file. If the -f option is not included,
89 no flags are set and the default conditions prevail.
90 By default, a new service is enabled and no utmpx
91 entry is created for it. An -f option without a fol‐
92 lowing argument is illegal.
93
94 x Do not enable the service svctag available
95 through port monitor pmtag.
96
97
98 u Create a utmpx entry for service svctag available
99 through port monitor pmtag.
100
101
102
103 -g Print, install, or replace a per-service configuration
104 script. The -g option with a -p option and a -s option
105 prints the per-service configuration script for ser‐
106 vice svctag available through port monitor pmtag. The
107 -g option with a -p option, a -s option, and a -z
108 option installs the per-service configuration script
109 contained in the file script as the per-service con‐
110 figuration script for service svctag available through
111 port monitor pmtag. The -g option with a - s option, a
112 -t option, and a -z option installs the file script as
113 the per-service configuration script for service svc‐
114 tag available through any port monitor of type type.
115 Other combinations of options with -g are invalid.
116
117
118 -i id id is the identity that is to be assigned to service
119 svctag when it is started. id must be an entry in
120 /etc/passwd.
121
122
123 -l The -l option requests service information. Used by
124 itself and with the options described below, it pro‐
125 vides a filter for extracting information in several
126 different groupings.
127
128 -l By itself, the -l option lists
129 all services on the system.
130
131
132 -l -p pmtag Lists all services available
133 through port monitor pmtag.
134
135
136 -l -s svctag Lists all services with tag
137 svctag.
138
139
140 -l -p pmtag-ssvctag Lists service svctag.
141
142
143 -l -t type Lists all services available
144 through port monitors of type
145 type.
146
147
148 -l -t type-ssvctag Lists all services with tag
149 svctag available through a port
150 monitor of type type.
151
152 Other combinations of options with -l are invalid.
153
154
155 -L The -L option is identical to the -l option except
156 that output is printed in a condensed format.
157
158
159 -m pmspecific pmspecific is the port monitor-specific portion of the
160 port monitor administrative file entry for the ser‐
161 vice.
162
163
164 -p pmtag Specifies the tag associated with the port monitor
165 through which a service (specified as -s svctag) is
166 available.
167
168
169 -r Remove a service. When pmadm removes a service, the
170 entry for the service is removed from the port moni‐
171 tor's administrative file.
172
173
174 -s svctag Specifies the service tag associated with a given ser‐
175 vice. The service tag is assigned by the system admin‐
176 istrator and is part of the entry for the service in
177 the port monitor's administrative file.
178
179
180 -t type Specifies the port monitor type.
181
182
183 -v ver Specifies the version number of the port monitor
184 administrative file. The version number may be given
185 as
186
187 -v 'pmspec -V
188
189
190 where pmspec is the special administrative command for
191 port monitor pmtag. This special command is ttyadm for
192 ttymon and nlsadmin for listen. The version stamp of
193 the port monitor is known by the command and is
194 returned when pmspec is invoked with a -V option.
195
196
197 -y comment Associate comment with the service entry in the port
198 monitor administrative file.
199
200
201 -z script Used with the -g option to specify the name of the
202 file that contains the per-service configuration
203 script. Modifying a configuration script is a three-
204 step procedure. First a copy of the existing script is
205 made (-g alone). Then the copy is edited. Finally, the
206 copy is put in place over the existing script (-g with
207 -z).
208
209
210
211 Options that request information write the requested information to the
212 standard output. A request for information using the -l option prints
213 column headers and aligns the information under the appropriate head‐
214 ings. In this format, a missing field is indicated by a hyphen. A
215 request for information in the condensed format using the -L option
216 prints the information in colon-separated fields; missing fields are
217 indicated by two successive colons. # is the comment character.
218
220 Example 1 Adding a Service to a Port Monitor with the Tag pmtag
221
222
223 The following command adds a service to a port monitor with tag pmtag
224 and gives the service the tag svctag. The port monitor-specific infor‐
225 mation is generated by specpm. The service defined by svctag will be
226 invoked with identity root.
227
228
229 pmadm -a -p pmtag -s svctag -i root -m `specpm -a arg1 -b arg2`-v `specpm -V`
230
231
232
233 Example 2 Adding a Service with Service Tab svctag
234
235
236 The following command adds a service with service tag svctag, identity
237 guest, and port monitor-specific information generated by specpm to all
238 port monitors of type type:
239
240
241 pmadm -a -s svctag -i guest -t type -m `specpm -a arg1 -b arg2`-v `specpm -V`
242
243
244
245 Example 3 Removing a Service
246
247
248 The following command removes the service svctag from port monitor
249 pmtag:
250
251
252 pmadm -r -p pmtag -s svctag
253
254
255
256 Example 4 Enabling a Service
257
258
259 The following command enables the service svctag available through port
260 monitor pmtag:
261
262
263 pmadm -e -p pmtag -s svctag
264
265
266
267 Example 5 Disabling a Service
268
269
270 The following command disables the service svctag available through
271 port monitor pmtag:
272
273
274 pmadm -d -p pmtag -s svctag
275
276
277
278 Example 6 Listing Status Information
279
280
281 The following command lists status information for all services:
282
283
284 pmadm -l
285
286
287
288 Example 7 Listing Status Information
289
290
291 The following command lists status information for all services avail‐
292 able through the port monitor with tag ports:
293
294
295 pmadm -l -p ports
296
297
298
299 Example 8 Listing Status Information in Condensed Format
300
301
302 The following command lists the status information for all services
303 available through the port monitor with tag ports in condensed format:
304
305
306 pmadm -L -p ports
307
308
309
310 Example 9 Listing Status Information for All Services
311
312
313 List status information for all services available through port moni‐
314 tors of type listen:
315
316
317 pmadm -l -t listen
318
319
320
321 Example 10 Printing the per-service Configuration
322
323
324 The following command prints the per-service configuration script asso‐
325 ciated with the service svctag available through port monitor pmtag:
326
327
328 pmadm -g -p pmtag -s svctag
329
330
331
333 The following exit values are returned:
334
335 0 Successful operation.
336
337
338 >0 Operation failed.
339
340
342 /etc/saf/pmtag/_config
343
344
345 /etc/saf/pmtag/svctag
346
347
348 /var/saf/pmtag/*
349
350
352 See attributes(5) for descriptions of the following attributes:
353
354
355
356
357 ┌─────────────────────────────┬─────────────────────────────┐
358 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
359 ├─────────────────────────────┼─────────────────────────────┤
360 │Availability │SUNWcsu │
361 └─────────────────────────────┴─────────────────────────────┘
362
364 sac(1M), sacadm(1M), doconfig(3NSL), attributes(5)
365
366
367
368SunOS 5.11 10 Nov 1998 pmadm(1M)