Print this page
11869 Fix disable option summary in svcadm(1m)
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1m/svcadm.1m
+++ new/usr/src/man/man1m/svcadm.1m
1 1 '\" te
2 2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
3 +.\" Copyright 2019 Joyent, Inc.
3 4 .\" 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 5 .\" 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 6 .\" 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 SVCADM 1M "Oct 17, 2017"
7 +.TH SVCADM 1M "Oct 24, 2019"
7 8 .SH NAME
8 9 svcadm \- manipulate service instances
9 10 .SH SYNOPSIS
10 -.LP
11 11 .nf
12 12 \fB/usr/sbin/svcadm\fR [\fB-S state\fR] [\fB-v\fR] [\fB-Z\fR | \fB-z\fR \fIzone\fR] enable [\fB-rst\fR]
13 13 [{\fIFMRI\fR | \fIpattern\fR}...]
14 14 .fi
15 15
16 16 .LP
17 17 .nf
18 -\fB/usr/sbin/svcadm\fR [\fB-S state\fR] [\fB-v\fR] [\fB-Z\fR | \fB-z\fR \fIzone\fR] disable [\fB-s\fR]
18 +\fB/usr/sbin/svcadm\fR [\fB-S state\fR] [\fB-v\fR] [\fB-Z\fR | \fB-z\fR \fIzone\fR] disable [\fB-st\fR]
19 19 [{\fIFMRI\fR | \fIpattern\fR}...]
20 20 .fi
21 21
22 22 .LP
23 23 .nf
24 24 \fB/usr/sbin/svcadm\fR [\fB-S state\fR] [\fB-v\fR] [\fB-Z\fR | \fB-z\fR \fIzone\fR] restart [\fB-d\fR]
25 25 [{\fIFMRI\fR | \fIpattern\fR}...]
26 26 .fi
27 27
28 28 .LP
29 29 .nf
30 30 \fB/usr/sbin/svcadm\fR [\fB-S state\fR] [\fB-v\fR] [\fB-Z\fR | \fB-z\fR \fIzone\fR] refresh
31 31 [{\fIFMRI\fR | \fIpattern\fR}...]
32 32 .fi
33 33
34 34 .LP
35 35 .nf
36 36 \fB/usr/sbin/svcadm\fR [\fB-S state\fR] [\fB-v\fR] [\fB-Z\fR | \fB-z\fR \fIzone\fR] clear
37 37 [{\fIFMRI\fR | \fIpattern\fR}...]
38 38 .fi
39 39
40 40 .LP
41 41 .nf
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
42 42 \fB/usr/sbin/svcadm\fR [\fB-S state\fR] [\fB-v\fR] [\fB-Z\fR | \fB-z\fR \fIzone\fR] mark [\fB-It] \fIinstance_state\fR
43 43 [{\fIFMRI\fR | \fIpattern\fR}...]
44 44 .fi
45 45
46 46 .LP
47 47 .nf
48 48 \fB/usr/sbin/svcadm\fR [\fB-v\fR] milestone [\fB-d\fR] \fImilestone_FMRI\fR
49 49 .fi
50 50
51 51 .SH DESCRIPTION
52 -.LP
53 52 \fBsvcadm\fR issues requests for actions on services executing within the
54 53 service management facility (see \fBsmf\fR(5)). Actions for a service are
55 54 carried out by its assigned service restarter agent. The default service
56 55 restarter is \fBsvc.startd\fR (see \fBsvc.startd\fR(1M)).
57 56 .SH OPTIONS
58 -.LP
59 57 The following options are supported:
60 58 .sp
61 59 .ne 2
62 60 .na
63 61 \fB-S\fR \fIstate\fR
64 62 .ad
65 63 .RS 20n
66 64 For the subcommands which normally operate on explicit \fIFMRI\fRs or an
67 65 \fIFMRI\fR pattern, the \fB-S\fR option can be used to select all \fIFMRI\fRs
68 66 in the given state.
69 67 .RE
70 68
71 69 .sp
72 70 .ne 2
73 71 .na
74 72 \fB\fB-v\fR\fR
75 73 .ad
76 74 .RS 20n
77 75 Print actions verbosely to standard output.
78 76 .RE
79 77
80 78 .sp
81 79 .ne 2
82 80 .na
83 81 \fB-Z\fR
84 82 .ad
85 83 .RS 20n
86 84 Administer services in all zones. This option is only applicable
87 85 from the global zone, see \fBzones\fR(5).
88 86 .RE
89 87
90 88 .sp
91 89 .ne 2
↓ open down ↓ |
23 lines elided |
↑ open up ↑ |
92 90 .na
93 91 \fB-z\fR \fIzone\fR
94 92 .ad
95 93 .RS 20n
96 94 Administer services in the specified zone. This option is only applicable
97 95 from the global zone, see \fBzones\fR(5).
98 96 .RE
99 97
100 98 .SH SUBCOMMANDS
101 99 .SS "Common Operations"
102 -.LP
103 100 The subcommands listed below are used during the typical administration of a
104 101 service instance.
105 102 .sp
106 103 .LP
107 104 For subcommands taking one or more operands, if the operand specifies a service
108 105 (instead of a service instance), and that service has only a single instance,
109 106 \fBsvcadm\fR operates on that instance. If an abbreviated \fIFMRI\fR (a fault
110 107 management resource identifier) matches more than one service or instance, a
111 108 warning message is displayed and that operand is ignored.
112 109 If a pattern matches more than one service or instance, the subcommand is
113 110 applied to all matches. See \fBsmf\fR(5).
114 111 .sp
115 112 .LP
116 113 In the case that the service has more than one instance, \fBsvcadm\fR return a
117 114 non-zero exit status.
118 115 .sp
119 116 .ne 2
120 117 .na
121 118 \fB\fBenable\fR \fB[\fR\fB-rst\fR\fB]\fR {\fIFMRI\fR | \fIpattern\fR}...\fR
122 119 .ad
123 120 .sp .6
124 121 .RS 4n
125 122 Enables the service instances specified by the operands. For each service
126 123 instance, the assigned restarter will try to bring it to the online state. This
127 124 action requires permission to modify the "general" property group of the
128 125 service instance (see \fBsmf_security\fR(5)).
129 126 .sp
130 127 If the \fB-r\fR option is specified, \fBsvcadm\fR enables each service instance
131 128 and recursively enables its dependencies.
132 129 .sp
133 130 If the \fB-s\fR option is specified, \fBsvcadm\fR enables each service instance
134 131 and then waits for each service instance to enter the \fBonline\fR or
135 132 \fBdegraded\fR state. \fBsvcadm\fR will return early if it determines that the
136 133 service cannot reach these states without administrator intervention.
137 134 .sp
138 135 If the \fB-t\fR option is specified, \fBsvcadm\fR temporarily enables each
139 136 service instance. Temporary enable only lasts until reboot. This action
140 137 requires permission to modify the "restarter_actions" property group of the
141 138 service instance (see \fBsmf_security\fR(5)). By default, \fBenable\fR is
142 139 persistent across reboot.
143 140 .RE
144 141
145 142 .sp
146 143 .ne 2
147 144 .na
148 145 \fB\fBdisable\fR [\fB-st\fR] {\fIFMRI\fR | \fIpattern\fR}...\fR
149 146 .ad
150 147 .sp .6
151 148 .RS 4n
152 149 Disables the service instance specified by the operands. For each service
153 150 instance, the assigned restarter will try to bring it to the disabled state.
154 151 This action requires permission to modify the "general" property group of the
155 152 service instance (see \fBsmf_security\fR(5)).
156 153 .sp
157 154 If the \fB-s\fR option is specified, \fBsvcadm\fR disables each service
158 155 instance and then waits for each service instance to enter the disabled state.
159 156 \fBsvcadm\fR will return early if it determines that the service cannot reach
160 157 this state without administrator intervention.
161 158 .sp
162 159 If the \fB-t\fR option is specified, \fBsvcadm\fR temporarily disables each
163 160 service instance. Temporary disable only lasts until reboot. This action
164 161 requires permission to modify the "restarter_actions" property group of the
165 162 service instance (see \fBsmf_security\fR(5)). By default, \fBdisable\fR is
166 163 persistent across reboot.
167 164 .RE
168 165
169 166 .sp
170 167 .ne 2
171 168 .na
172 169 \fB\fBrestart\fR [\fB-d\fR] {\fIFMRI\fR | \fIpattern\fR}...\fR
173 170 .ad
174 171 .sp .6
175 172 .RS 4n
176 173 Requests that the service instances specified by the operands be restarted.
177 174 This action requires permission to modify the "restarter_actions" property
178 175 group of the service instance (see \fBsmf_security\fR(5)).
179 176 .sp
180 177 This subcommand can restart only those services that are in the online or
181 178 degraded states, as those states are defined in \fBsmf\fR(5).
182 179 .sp
183 180 If the \fB-d\fR option is specified, the restarter sends a \fBSIGABRT\fR to all
184 181 members of the contract, which should cause a core dump, before restarting
185 182 the service.
186 183 .RE
187 184
188 185 .sp
189 186 .ne 2
190 187 .na
191 188 \fB\fBrefresh\fR {\fIFMRI\fR | \fIpattern\fR}...\fR
192 189 .ad
193 190 .sp .6
194 191 .RS 4n
195 192 For each service instance specified by the operands, requests that the assigned
196 193 restarter update the service's running configuration snapshot with the values
197 194 from the current configuration. Some of these values take effect immediately
198 195 (for example, dependency changes). Other values do not take effect until the
199 196 next service \fBrestart\fR. See the restarter and service documentation for
200 197 more information.
201 198 .sp
202 199 If the service is managed by \fBsvc.startd\fR(1M), the \fBrefresh\fR method
203 200 will be invoked if it exists to request the service reread its own
204 201 configuration. For other restarters, see the restarter documentation.
205 202 .sp
206 203 This action requires permission to modify the "restarter_actions" property
207 204 group of the service instance (see \fBsmf_security\fR(5)).
208 205 .RE
209 206
210 207 .sp
211 208 .ne 2
212 209 .na
213 210 \fB\fBclear\fR {\fIFMRI\fR | \fIpattern\fR}...\fR
214 211 .ad
215 212 .sp .6
↓ open down ↓ |
103 lines elided |
↑ open up ↑ |
216 213 .RS 4n
217 214 For each service instance specified by the operands, if the instance is in the
218 215 \fBmaintenance\fR state, signal to the assigned restarter that the service has
219 216 been repaired. If the instance is in the \fBdegraded\fR state, request that the
220 217 assigned restarter take the service to the \fBonline\fR state. This action
221 218 requires permission to modify the "restarter_actions" property group of the
222 219 service instance (see \fBsmf_security\fR(5)).
223 220 .RE
224 221
225 222 .SS "Exceptional Operations"
226 -.LP
227 223 The following subcommands are used for service development and temporary
228 224 administrative manipulation.
229 225 .sp
230 226 .ne 2
231 227 .na
232 228 \fB\fBmark [\fR\fB-It\fR\fB]\fR \fIinstance_state\fR {\fIFMRI\fR |
233 229 \fIpattern\fR}...\fR
234 230 .ad
235 231 .sp .6
236 232 .RS 4n
237 233 If \fIinstance_state\fR is "maintenance", then for each service specified by
238 234 the operands, \fBsvcadm\fR requests that the assigned restarter place the
239 235 service in the \fBmaintenance\fR state. See \fBsvc.startd\fR(1M) and
240 236 \fBinetd\fR(1M) for a detailed description of the actions taken for each
241 237 restarter.
242 238 .sp
243 239 If \fIinstance_state\fR is "degraded", then for services specified by the
244 240 operands in the online state, \fBsvcadm\fR requests that the restarters
245 241 assigned to the services move them into the \fBdegraded\fR state.
246 242 .sp
247 243 If the \fB-I\fR option is specified, the request is flagged as immediate.
248 244 .sp
249 245 The \fB-t\fR option is only valid for maintenance requests. When this option is
250 246 specified, the request is flagged as temporary, and its effect will only last
251 247 until the next reboot.
252 248 .RE
253 249
254 250 .sp
255 251 .ne 2
256 252 .na
257 253 \fB\fBmilestone\fR [\fB-d\fR] \fImilestone_FMRI\fR\fR
258 254 .ad
259 255 .sp .6
260 256 .RS 4n
261 257 If \fImilestone_FMRI\fR is the keyword "none", all services other than the
262 258 master restarter, \fBsvc:/system/svc/restarter:default\fR, will be temporarily
263 259 disabled.
264 260 .sp
265 261 If \fImilestone_FMRI\fR is the keyword "all", temporary enable and disable
266 262 requests for all services will be nullified.
267 263 .sp
268 264 If \fImilestone_FMRI\fR is one of the following:
269 265 .sp
270 266 .in +2
271 267 .nf
272 268 svc:/milestone/single-user:default
273 269 svc:/milestone/multi-user:default
274 270 svc:/milestone/multi-user-server:default
275 271 .fi
276 272 .in -2
277 273 .sp
278 274
279 275 then temporary enable and disable requests for the indicated service and all
280 276 services it depends on (directly or indirectly) will be nullified. All other
281 277 services will be temporarily disabled.
282 278 .sp
283 279 Changing the system's current milestone with the "milestone" subcommand will
284 280 not change the current run level of the system. To change the system's run
285 281 level, invoke \fB/sbin/init\fR directly.
286 282 .sp
287 283 This action requires permission to modify the "options_ovr" property group of
288 284 the \fBsvc:/system/svc/restarter:default\fR service instance (see
289 285 \fBsmf_security\fR(5)).
290 286 .sp
291 287 The \fB-d\fR option immediately changes the milestone to the requested
↓ open down ↓ |
55 lines elided |
↑ open up ↑ |
292 288 milestone, as above. Additionally, it makes the specified milestone the default
293 289 boot milestone, which persists across reboot. The default milestone is defined
294 290 by the \fBoptions/milestone\fR property on the master restarter,
295 291 \fBsvc:/system/svc/restarter:default\fR. If this property is absent, "all" is
296 292 the default. This action requires permission to modify the "options" property
297 293 group of the \fBsvc:/system/svc/restarter:default\fR service instance (see
298 294 \fBsmf_security\fR(5)).
299 295 .RE
300 296
301 297 .SS "Operands"
302 -.LP
303 298 The following operands are supported:
304 299 .sp
305 300 .ne 2
306 301 .na
307 302 \fB\fIFMRI\fR\fR
308 303 .ad
309 304 .RS 11n
310 305 An \fIFMRI\fR that specifies one or more instances. \fIFMRI\fRs can be
311 306 abbreviated by specifying the instance name, or the trailing portion of the
312 307 service name. For example, given the \fIFMRI\fR:
313 308 .sp
314 309 .in +2
315 310 .nf
316 311 svc:/network/smtp:sendmail
317 312 .fi
318 313 .in -2
319 314 .sp
320 315
321 316 All the following are valid abbreviations:
322 317 .sp
323 318 .in +2
324 319 .nf
325 320 sendmail
326 321 :sendmail
327 322 smtp
328 323 smtp:sendmail
329 324 network/smtp
330 325 .fi
331 326 .in -2
332 327 .sp
333 328
334 329 While the following are invalid:
335 330 .sp
336 331 .in +2
337 332 .nf
338 333 mail
339 334 network
340 335 network/smt
341 336 .fi
342 337 .in -2
343 338 .sp
344 339
345 340 If the \fIFMRI\fR specifies a service, then the command applies to all
346 341 instances of that service. Abbreviated forms of \fIFMRI\fRs are unstable, and
347 342 should not be used in scripts or other permanent tools.
348 343 .RE
349 344
350 345 .sp
351 346 .ne 2
352 347 .na
353 348 \fB\fIpattern\fR\fR
354 349 .ad
355 350 .RS 11n
356 351 A pattern that is matched against the \fIFMRIs\fR of service instances
357 352 according to the "globbing" rules described by \fBfnmatch\fR(5). If the pattern
↓ open down ↓ |
45 lines elided |
↑ open up ↑ |
358 353 does not begin with "svc:", then "svc:/" is prepended.
359 354 .RE
360 355
361 356 .sp
362 357 .LP
363 358 If an abbreviated \fIFMRI\fR matches more than one service, a warning message
364 359 is displayed and that operand is ignored.
365 360 If a pattern matches more than one service or instance, the subcommand is
366 361 applied to all matches.
367 362 .SH EXAMPLES
368 -.LP
369 363 \fBExample 1 \fRRestarting a Service Instance
370 364 .sp
371 365 .LP
372 366 The following command restarts the \fBNFS\fR server. The full \fIFMRI\fR for
373 367 the default service instance is: \fBsvc:/network/nfs/server:default\fR
374 368
375 369 .sp
376 370 .LP
377 371 However, you can abbreviate the full \fIFMRI\fR as follows:
378 372
379 373 .sp
380 374 .in +2
381 375 .nf
382 376 # svcadm restart nfs/server
383 377 .fi
384 378 .in -2
385 379 .sp
386 380
387 381 .LP
388 382 \fBExample 2 \fRDisabling the Standard HTTP Server
389 383 .sp
390 384 .LP
391 385 The following command disables the standard HTTP server, using an abbreviated
392 386 \fIFMRI\fR:
393 387
394 388 .sp
395 389 .in +2
396 390 .nf
397 391 $ svcadm disable http
398 392 .fi
399 393 .in -2
400 394 .sp
401 395
402 396 .LP
403 397 \fBExample 3 \fREnabling an Instance and Its Dependent Instances
404 398 .sp
405 399 .LP
406 400 The following command enables the \fBfoo:bar\fR instance, and all instances on
407 401 which it depends:
408 402
409 403 .sp
410 404 .in +2
411 405 .nf
412 406 $ svcadm enable -r foo:bar
413 407 .fi
414 408 .in -2
415 409 .sp
416 410
417 411 .LP
418 412 \fBExample 4 \fRSynchronously enabling an instance
419 413 .sp
420 414 .LP
421 415 The following command enables the \fBfoo:bar\fR instance. The command will not
422 416 return until the instance comes online or \fBsvcadm\fR determines it is not
423 417 possible for the service to come online.
424 418
425 419 .sp
426 420 .in +2
427 421 .nf
428 422 $ svcadm enable -s foo:bar
429 423 .fi
430 424 .in -2
431 425 .sp
432 426
433 427 .LP
434 428 \fBExample 5 \fRRestricting and Restoring the Running Services
435 429 .sp
436 430 .LP
437 431 The following command restricts the running services to single user mode:
438 432
439 433 .sp
440 434 .in +2
441 435 .nf
442 436 # svcadm milestone milestone/single-user
443 437 .fi
444 438 .in -2
445 439 .sp
446 440
447 441 .sp
448 442 .LP
449 443 The following command restores the running services:
↓ open down ↓ |
71 lines elided |
↑ open up ↑ |
450 444
451 445 .sp
452 446 .in +2
453 447 .nf
454 448 # svcadm milestone all
455 449 .fi
456 450 .in -2
457 451 .sp
458 452
459 453 .SH EXIT STATUS
460 -.LP
461 454 The following exit values are returned:
462 455 .sp
463 456 .ne 2
464 457 .na
465 458 \fB\fB0\fR\fR
466 459 .ad
467 460 .RS 5n
468 461 Successful completion.
469 462 .RE
470 463
471 464 .sp
472 465 .ne 2
473 466 .na
474 467 \fB\fB1\fR\fR
475 468 .ad
476 469 .RS 5n
477 470 A fatal error occurred. One or more error messages are displayed on standard
478 471 error.
479 472 .RE
480 473
481 474 .sp
482 475 .ne 2
483 476 .na
484 477 \fB\fB2\fR\fR
485 478 .ad
486 479 .RS 5n
487 480 Invalid command line options were specified.
488 481 .RE
489 482
490 483 .sp
491 484 .ne 2
492 485 .na
493 486 \fB\fB3\fR\fR
494 487 .ad
495 488 .RS 5n
496 489 \fBsvcadm\fR determined that a service instance that it was waiting for could
497 490 not reach the desired state without administrator intervention due to a problem
498 491 with the service instance itself.
499 492 .RE
500 493
501 494 .sp
502 495 .ne 2
↓ open down ↓ |
32 lines elided |
↑ open up ↑ |
503 496 .na
504 497 \fB\fB4\fR\fR
505 498 .ad
506 499 .RS 5n
507 500 \fBsvcadm\fR determined that a service instance that it was waiting for could
508 501 not reach the desired state without administrator intervention due to a problem
509 502 with the service's dependencies.
510 503 .RE
511 504
512 505 .SH ATTRIBUTES
513 -.LP
514 506 See \fBattributes\fR(5) for descriptions of the following attributes:
515 507 .sp
516 508
517 509 .sp
518 510 .TS
519 511 box;
520 512 c | c
521 513 l | l .
522 514 ATTRIBUTE TYPE ATTRIBUTE VALUE
523 515 _
524 516 Interface Stability See below.
525 517 .TE
526 518
527 519 .sp
528 520 .LP
529 521 The interactive output is Uncommitted. The invocation and non-interactive
530 522 output are Committed.
531 523 .SH SEE ALSO
532 -.LP
533 524 \fBsvcprop\fR(1), \fBsvcs\fR(1), \fBinetd\fR(1M), \fBinit\fR(1M),
534 525 \fBsvccfg\fR(1M), \fBsvc.startd\fR(1M), \fBlibscf\fR(3LIB), \fBcontract\fR(4),
535 526 \fBattributes\fR(5), \fBsmf\fR(5), \fBsmf_security\fR(5), \fBzones\fR(5)
536 527 .SH NOTES
537 -.LP
538 528 The amount of time \fBsvcadm\fR will spend waiting for services and their
539 529 dependencies to change state is implicitly limited by their method timeouts.
540 530 For example, a service using the default restarter whose start method hangs
541 531 will be transitioned to the maintenance state when its timeout expires.
542 532 \fBsvcadm\fR will then consider it impossible for this service to come online
543 533 without administrator intervention.
544 534 .sp
545 535 .LP
546 536 Attempts to synchronously enable a service which depends (directly or
547 537 indirectly) on a file may fail with an exit status indicating that dependencies
548 538 are unsatisfied if the caller does not have the privileges necessary to search
549 539 the directory containing the file. This limitation may be removed in a future
550 540 release.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX