Print this page
12721 would like svcadm disable -c
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1/svcs.1.man.txt
+++ new/usr/src/man/man1/svcs.1.man.txt
1 1 SVCS(1) User Commands SVCS(1)
2 2
3 3
4 4
5 5 NAME
6 6 svcs - report service status
7 7
8 8 SYNOPSIS
9 9 svcs [-aHpv?] [-Z | -z zone] [-o col[,col]]... [-R FMRI-instance]...
10 10 [-sS col]... [FMRI | pattern]...
11 11
12 12
13 13 svcs {-d | -D} [-Hpv?] [-Z | -z zone] [-o col[,col]]... [-sS col]...
14 14 [FMRI | pattern] ...
15 15
16 16
17 17 svcs [-l | -L] [-vZ] [-z zone] [FMRI | pattern]...
18 18
19 19
20 20 svcs -x [-v] [-Z | -z zone] [FMRI]...
21 21
22 22
23 23 DESCRIPTION
24 24 The svcs command displays information about service instances as
25 25 recorded in the service configuration repository.
26 26
27 27
28 28 The first form of this command prints one-line status listings for
29 29 service instances specified by the arguments. Each instance is listed
30 30 only once. With no arguments, all enabled service instances, even if
31 31 temporarily disabled, are listed with the columns indicated below.
32 32
33 33
34 34 The second form prints one-line status listings for the dependencies or
35 35 dependents of the service instances specified by the arguments.
36 36
37 37
38 38 The third form prints detailed information about specific services and
39 39 instances.
40 40
41 41
42 42 The fourth form explains the states of service instances. For each
43 43 argument, a block of human-readable text is displayed which explains
44 44 what state the service is in, and why it is in that state. With no
45 45 arguments, problematic services are described.
46 46
47 47
48 48 Error messages are printed to the standard error stream.
49 49
50 50
51 51 The output of this command can be used appropriately as input to the
52 52 svcadm(1M) command.
53 53
54 54 OPTIONS
55 55 The following options are supported:
56 56
57 57 -?
58 58 Displays an extended usage message, including
59 59 column specifiers.
60 60
61 61
62 62 -a
63 63 Show all services, even disabled ones. This option
64 64 has no effect if services are selected.
65 65
66 66
67 67 -d
68 68 Lists the services or service instances upon which
69 69 the given service instances depend.
70 70
71 71
72 72 -D
73 73 Lists the service instances that depend on the
74 74 given services or service instances.
75 75
76 76
77 77 -H
78 78 Omits the column headers.
79 79
80 80
81 81 -l
82 82 (The letter ell.) Displays all available
83 83 information about the selected services and service
84 84 instances, with one service attribute displayed for
85 85 each line. Information for different instances are
86 86 separated by blank lines.
87 87
88 88 The following specific attributes require further
89 89 explanation:
90 90
91 91 dependency
92 92 Information about a dependency. The
93 93 grouping and restart_on properties
94 94 are displayed first and are separated
95 95 by a forward slash (/). Next, each
96 96 entity and its state is listed. See
97 97 smf(5) for information about states.
98 98 In addition to the standard states,
99 99 each service dependency can have the
100 100 following state descriptions:
101 101
102 102 absent
103 103 No such service is
104 104 defined on the system.
105 105
106 106
107 107 invalid
108 108 The fault management
109 109 resource identifier
110 110 (FMRI) is invalid (see
111 111 smf(5)).
112 112
113 113
114 114 multiple
115 115 The entity is a service
116 116 with multiple instances.
117 117
118 118 File dependencies can only have one
119 119 of the following state descriptions:
120 120
121 121 absent
122 122 No such file on the
123 123 system.
124 124
125 125
126 126 online
127 127 The file exists.
128 128
129 129 If the file did not exist
130 130 the last time that
131 131 svc.startd evaluated the
132 132 service's dependencies, it
133 133 can consider the
134 134 dependency to be
135 135 unsatisfied. svcadm
136 136 refresh forces dependency
137 137 re-evaluation.
138 138
139 139
140 140 unknown
141 141 stat(2) failed for a
142 142 reason other than ENOENT.
143 143
144 144 See smf(5) for additional details
145 145 about dependencies, grouping, and
146 146 restart_on values.
147 147
148 148
149 149 enabled
150 150 Whether the service is enabled or
151 151 not, and whether it is enabled or
152 152 disabled temporarily (until the next
153 153 system reboot). The former is
154 154 specified as either true or false,
↓ open down ↓ |
154 lines elided |
↑ open up ↑ |
155 155 and the latter is designated by the
156 156 presence of (temporary).
157 157
158 158 A service might be temporarily
159 159 disabled because an administrator has
160 160 run svcadm disable -t, used svcadm
161 161 milestone, or booted the system to a
162 162 specific milestone. See svcadm(1M)
163 163 for details.
164 164
165 + If a service instance was disabled
166 + via svcadm disable -c , then the
167 + provided comment will also be
168 + displayed.
165 169
166 170
171 +
167 172 -L
168 173 Display the log file of the selected services and
169 174 service instances, one per-line.
170 175
171 176
172 177 -o col[,col]...
173 178 Prints the specified columns. Each col should be a
174 179 column name. See COLUMNS below for available
175 180 columns.
176 181
177 182
178 183 -p
179 184 Lists processes associated with each service
180 185 instance. A service instance can have no associated
181 186 processes. The process ID, start time, and command
182 187 name (PID, STIME, and CMD fields from ps(1)) are
183 188 displayed for each process.
184 189
185 190
186 191 -R FMRI-instance
187 192 Selects service instances that have the given
188 193 service instance as their restarter.
189 194
190 195
191 196 -s col
192 197 Sorts output by column. col should be a column
193 198 name. See COLUMNS below for available columns.
194 199 Multiple -s options behave additively.
195 200
196 201
197 202 -S col
198 203 Sorts by col in the opposite order as option -s.
199 204
200 205
201 206 -v
202 207 Without -x or -l, displays verbose columns: STATE,
203 208 NSTATE, STIME, CTID, and FMRI.
204 209
205 210 With -x, displays extra information for each
206 211 explanation.
207 212
208 213 With -l, displays user-visible properties in
209 214 property groups of type application and their
210 215 description.
211 216
212 217
213 218 -x
214 219 Displays explanations for service states.
215 220
216 221 Without arguments, the -x option explains the
217 222 states of services which:
218 223
219 224 o are enabled, but are not running.
220 225
221 226 o are preventing another enabled service
222 227 from running.
223 228
224 229
225 230 -z zone
226 231 Display only the services in the zone. This option
227 232 is only applicable in the global zone, see
228 233 zones(5).
229 234
230 235
231 236 -Z
232 237 Display services from all zones, with an additional
233 238 column indicating in which zone the service is
234 239 running. This option is only applicable in the
235 240 global zone, see zones(5).
236 241
237 242
238 243 OPERANDS
239 244 The following operands are supported:
240 245
241 246 FMRI
242 247 A fault management resource identifier (FMRI) that
243 248 specifies one or more instances (see smf(5)). FMRIs
244 249 can be abbreviated by specifying the instance name, or
245 250 the trailing portion of the service name. For example,
246 251 given the FMRI:
247 252
248 253 svc:/network/smtp:sendmail
249 254
250 255
251 256 The following are valid abbreviations:
252 257
253 258 sendmail
254 259 :sendmail
255 260 smtp
256 261 smtp:sendmail
257 262 network/smtp
258 263
259 264
260 265 The following are invalid abbreviations:
261 266
262 267 mail
263 268 network
264 269 network/smt
265 270
266 271
267 272 If the FMRI specifies a service, then the command
268 273 applies to all instances of that service, except when
269 274 used with the -D option.
270 275
271 276 Abbreviated forms of FMRIs are unstable, and should
272 277 not be used in scripts or other permanent tools.
273 278
274 279
275 280 pattern
276 281 A pattern that is matched against the FMRIs of service
277 282 instances according to the "globbing" rules described
278 283 by fnmatch(5). If the pattern does not begin with
279 284 svc:, then svc:/ is prepended. The following is a
280 285 typical example of a glob pattern:
281 286
282 287 qexample% svcs \*keyserv\*
283 288 STATE STIME FMRI
284 289 disabled Aug_02 svc:/network/rpc/keyserv:default
285 290
286 291
287 292
288 293
289 294 FMRI-instance
290 295 An FMRI that specifies an instance.
291 296
292 297
293 298 COLUMNS
294 299 Column names are case insensitive. The default output format is
295 300 equivalent to "-o state,stime,fmri". The default sorting columns are
296 301 STATE, STIME, FMRI.
297 302
298 303 CTID
299 304 The primary contract ID for the service instance. Not all
300 305 instances have valid primary contract IDs.
301 306
302 307
303 308 DESC
304 309 A brief description of the service, from its template
305 310 element. A service might not have a description available, in
306 311 which case a hyphen (-) is used to denote an empty value.
307 312
308 313
309 314 FMRI
310 315 The FMRI of the service instance.
311 316
312 317
313 318 INST
314 319 The instance name of the service instance.
315 320
316 321
317 322 NSTA
318 323 The abbreviated next state of the service instance, as given
319 324 in the STA column description. A hyphen denotes that the
320 325 instance is not transitioning. Same as STA otherwise.
321 326
322 327
323 328 NSTATE
324 329 The next state of the service. A hyphen is used to denote
325 330 that the instance is not transitioning. Same as STATE
326 331 otherwise.
327 332
328 333
329 334 SCOPE
330 335 The scope name of the service instance.
331 336
332 337
333 338 SVC
334 339 The service name of the service instance.
335 340
336 341
337 342 STA
338 343 The abbreviated state of the service instance (see smf(5)):
339 344
340 345 DGD
341 346 degraded
342 347
343 348
344 349 DIS
345 350 disabled
346 351
347 352
348 353 LRC
349 354 legacy rc*.d script-initiated instance
350 355
351 356
352 357 MNT
353 358 maintenance
354 359
355 360
356 361 OFF
357 362 offline
358 363
359 364
360 365 ON
361 366 online
362 367
363 368
364 369 UN
365 370 uninitialized
366 371
367 372 Absent or unrecognized states are denoted by a question mark
368 373 (?) character. An asterisk (*) is appended for instances in
369 374 transition, unless the NSTA or NSTATE column is also being
370 375 displayed.
371 376
372 377 See smf(5) for an explanation of service states.
373 378
374 379
375 380 STATE
376 381 The state of the service instance. An asterisk is appended
377 382 for instances in transition, unless the NSTA or NSTATE column
378 383 is also being displayed.
379 384
380 385 See smf(5) for an explanation of service states.
381 386
382 387
383 388 STIME
384 389 If the service instance entered the current state within the
385 390 last 24 hours, this column indicates the time that it did so.
386 391 Otherwise, this column indicates the date on which it did so,
387 392 printed with underscores (_) in place of blanks.
388 393
389 394
390 395 EXAMPLES
391 396 Example 1 Displaying the Default Output
392 397
393 398
394 399 This example displays default output:
395 400
396 401
397 402 example% svcs
398 403 STATE STIME FMRI
399 404 ...
400 405 legacy_run 13:25:04 lrc:/etc/rc3_d/S42myscript
401 406 ...
402 407 online 13:21:50 svc:/system/svc/restarter:default
403 408 ...
404 409 online 13:25:03 svc:/milestone/multi-user:default
405 410 ...
406 411 online 13:25:07 svc:/milestone/multi-user-server:default
407 412 ...
408 413
409 414
410 415
411 416 Example 2 Listing All Local Instances
412 417
413 418
414 419 This example lists all local instances of the service1 service.
415 420
416 421
417 422 example% svcs -o state,nstate,fmri service1
418 423 STATE NSTATE FMRI
419 424 online - svc:/service1:instance1
420 425 disabled - svc:/service1:instance2
421 426
422 427
423 428
424 429 Example 3 Listing Verbose Information
425 430
426 431
427 432 This example lists verbose information.
428 433
429 434
430 435 example% svcs -v network/rpc/rstat:udp
431 436 STATE NSTATE STIME CTID FMRI
432 437 online - Aug_09 - svc:/network/rpc/rstat:udp
433 438
434 439
435 440
436 441 Example 4 Listing Detailed Information
437 442
438 443
439 444 This example lists detailed information about all instances of
440 445 system/service3. Additional fields can be displayed, as appropriate to
441 446 the managing restarter.
442 447
443 448
444 449 example% svcs -l network/rpc/rstat:udp
445 450
446 451 fmri svc:/network/rpc/rstat:udp
447 452 enabled true
448 453 state online
449 454 next_state none
450 455 restarter svc:/network/inetd:default
451 456 contract_id
452 457 dependency require_all/error svc:/network/rpc/bind (online)
453 458
454 459
455 460
456 461 Example 5 Listing Processes
457 462
458 463 example% svcs -p sendmail
459 464 STATE STIME FMRI
460 465 online 13:25:13 svc:/network/smtp:sendmail
461 466 13:25:15 100939 sendmail
462 467 13:25:15 100940 sendmail
463 468
464 469
465 470
466 471 Example 6 Explaining Service States Using svcs -x
467 472
468 473
469 474 (a) In this example, svcs -x has identified that the print/server
470 475 service being disabled is the root cause of two services which are
471 476 enabled but not online. svcs -xv shows that those services are
472 477 print/rfc1179 and print/ipp-listener. This situation can be rectified
473 478 by either enabling print/server or disabling rfc1179 and ipp-listener.
474 479
475 480
476 481 example% svcs -x
477 482 svc:/application/print/server:default (LP print server)
478 483 State: disabled since Mon Feb 13 17:56:21 2006
479 484 Reason: Disabled by an administrator.
480 485 See: http://illumos.org/msg/SMF-8000-05
481 486 See: lpsched(1M)
482 487 Impact: 2 dependent services are not running. (Use -v for list.)
483 488
484 489
485 490
486 491
487 492 (b) In this example, NFS is not working:
488 493
489 494
490 495 example$ svcs nfs/client
491 496 STATE STIME FMRI
492 497 offline 16:03:23 svc:/network/nfs/client:default
493 498
494 499
495 500
496 501
497 502 (c) The following example shows that the problem is nfs/status.
498 503 nfs/client is waiting because it depends on nfs/nlockmgr, which depends
499 504 on nfs/status:
500 505
501 506
502 507 example$ svcs -xv nfs/client
503 508 svc:/network/nfs/client:default (NFS client)
504 509 State: offline since Mon Feb 27 16:03:23 2006
505 510 Reason: Service svc:/network/nfs/status:default
506 511 is not running because a method failed repeatedly.
507 512 See: http://illumos.org/msg/SMF-8000-GE
508 513 Path: svc:/network/nfs/client:default
509 514 svc:/network/nfs/nlockmgr:default
510 515 svc:/network/nfs/status:default
511 516 See: man -M /usr/share/man -s 1M mount_nfs
512 517 See: /var/svc/log/network-nfs-client:default.log
513 518 Impact: This service is not running.
514 519
515 520
516 521
517 522 EXIT STATUS
518 523 The following exit values are returned:
519 524
520 525 0
521 526 Successful command invocation.
522 527
523 528
524 529 1
525 530 Fatal error.
526 531
527 532
528 533 2
529 534 Invalid command line options were specified.
530 535
531 536
532 537 ATTRIBUTES
533 538 See attributes(5) for descriptions of the following attributes:
534 539
535 540
536 541
537 542
538 543 +--------------------+-----------------+
539 544 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
540 545 +--------------------+-----------------+
541 546 |Interface Stability | See below. |
542 547 +--------------------+-----------------+
↓ open down ↓ |
366 lines elided |
↑ open up ↑ |
543 548
544 549
545 550 Screen output is Uncommitted. The invocation is Committed.
546 551
547 552 SEE ALSO
548 553 ps(1), svcprop(1), svcadm(1M), svccfg(1M), svc.startd(1M), stat(2),
549 554 libscf(3LIB), attributes(5), fnmatch(5), smf(5), zones(5)
550 555
551 556
552 557
553 - April 17, 2011 SVCS(1)
558 + May 11, 2020 SVCS(1)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX