Print this page
12721 would like svcadm disable -c
   1 '\" te
   2 .\" Copyright (c) 2008, 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 SVCS 1 "Apr 17, 2011"
   7 .SH NAME
   8 svcs \- report service status
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 \fBsvcs\fR [\fB-aHpv?\fR] [\fB-Z\fR | \fB-z\fR \fIzone\fR] [\fB-o\fR \fIcol\fR[,\fIcol\fR]]... [\fB-R\fR \fIFMRI-instance\fR]...
  13      [\fB-sS\fR \fIcol\fR]... [\fIFMRI\fR | \fIpattern\fR]...
  14 .fi
  15 
  16 .LP
  17 .nf
  18 \fBsvcs\fR {\fB-d\fR | \fB-D\fR} [\fB-Hpv?\fR] [\fB-Z\fR | \fB-z\fR \fIzone\fR] [\fB-o\fR \fIcol\fR[,\fIcol\fR]]... [\fB-sS\fR \fIcol\fR]...
  19      [\fIFMRI\fR | \fIpattern\fR] ...
  20 .fi
  21 
  22 .LP
  23 .nf
  24 \fBsvcs\fR [\fB-l\fR | \fB-L\fR] [\fB-vZ\fR] [\fB-z\fR \fIzone\fR] [\fIFMRI\fR | \fIpattern\fR]...
  25 .fi
  26 
  27 .LP
  28 .nf
  29 \fBsvcs\fR \fB-x\fR [\fB-v\fR] [\fB-Z\fR | \fB-z\fR \fIzone\fR] [\fIFMRI\fR]...
  30 .fi
  31 
  32 .SH DESCRIPTION
  33 .sp
  34 .LP
  35 The \fBsvcs\fR command displays information about service instances as recorded
  36 in the service configuration repository.
  37 .sp
  38 .LP
  39 The first form of this command prints one-line status listings for service
  40 instances specified by the arguments. Each instance is listed only once. With
  41 no arguments, all enabled service instances, even if temporarily disabled, are
  42 listed with the columns indicated below.
  43 .sp
  44 .LP
  45 The second form prints one-line status listings for the dependencies or
  46 dependents of the service instances specified by the arguments.
  47 .sp
  48 .LP
  49 The third form prints detailed information about specific services and
  50 instances.
  51 .sp
  52 .LP
  53 The fourth form explains the states of service instances. For each argument, a
  54 block of human-readable text is displayed which explains what state the service
  55 is in, and why it is in that state. With no arguments, problematic services are
  56 described.
  57 .sp
  58 .LP
  59 Error messages are printed to the standard error stream.
  60 .sp
  61 .LP
  62 The output of this command can be used appropriately as input to the
  63 \fBsvcadm\fR(1M) command.
  64 .SH OPTIONS
  65 .sp
  66 .LP
  67 The following options are supported:
  68 .sp
  69 .ne 2
  70 .na
  71 \fB\fB-?\fR\fR
  72 .ad
  73 .RS 20n
  74 Displays an extended usage message, including column specifiers.
  75 .RE
  76 
  77 .sp
  78 .ne 2
  79 .na
  80 \fB\fB-a\fR\fR
  81 .ad
  82 .RS 20n
  83 Show all services, even disabled ones. This option has no effect if services
  84 are selected.
  85 .RE
  86 


 195 .RE
 196 
 197 See \fBsmf\fR(5) for additional details about dependencies, grouping, and
 198 \fBrestart_on\fR values.
 199 .RE
 200 
 201 .sp
 202 .ne 2
 203 .na
 204 \fB\fBenabled\fR\fR
 205 .ad
 206 .RS 14n
 207 Whether the service is enabled or not, and whether it is enabled or disabled
 208 temporarily (until the next system reboot). The former is specified as either
 209 \fBtrue\fR or \fBfalse\fR, and the latter is designated by the presence of
 210 \fB(temporary)\fR.
 211 .sp
 212 A service might be temporarily disabled because an administrator has run
 213 \fBsvcadm disable -t\fR, used \fBsvcadm milestone\fR, or booted the system to a
 214 specific milestone. See \fBsvcadm\fR(1M) for details.




 215 .RE
 216 
 217 .RE
 218 
 219 .sp
 220 .ne 2
 221 .na
 222 \fB-L\fR
 223 .ad
 224 .RS 20n
 225 Display the log file of the selected services and service instances, one
 226 per-line.
 227 .RE
 228 
 229 .sp
 230 .ne 2
 231 .na
 232 \fB\fB-o\fR \fIcol\fR[,\fIcol\fR]...\fR
 233 .ad
 234 .RS 20n


 320 .na
 321 \fB-z \fIzone\fR
 322 .ad
 323 .RS 20n
 324 Display only the services in the \fIzone\fR.  This option is only applicable
 325 in the global zone, see \fBzones\fR(5).
 326 .RE
 327 
 328 .sp
 329 .ne 2
 330 .na
 331 \fB-Z\fR
 332 .ad
 333 .RS 20n
 334 Display services from all zones, with an additional column indicating in which
 335 zone the service is running.  This option is only applicable in the global
 336 zone, see \fBzones\fR(5).
 337 .RE
 338 
 339 .SH OPERANDS
 340 .sp
 341 .LP
 342 The following operands are supported:
 343 .sp
 344 .ne 2
 345 .na
 346 \fB\fIFMRI\fR\fR
 347 .ad
 348 .RS 17n
 349 A fault management resource identifier (FMRI) that specifies one or more
 350 instances (see \fBsmf\fR(5)). FMRIs can be abbreviated by specifying the
 351 instance name, or the trailing portion of the service name. For example, given
 352 the FMRI:
 353 .sp
 354 .in +2
 355 .nf
 356 svc:/network/smtp:sendmail
 357 .fi
 358 .in -2
 359 .sp
 360 
 361 The following are valid abbreviations:


 404 .nf
 405 qexample% svcs \e*keyserv\e*
 406 STATE          STIME     FMRI
 407 disabled       Aug_02    svc:/network/rpc/keyserv:default
 408 .fi
 409 .in -2
 410 .sp
 411 
 412 .RE
 413 
 414 .sp
 415 .ne 2
 416 .na
 417 \fB\fIFMRI-instance\fR\fR
 418 .ad
 419 .RS 17n
 420 An FMRI that specifies an instance.
 421 .RE
 422 
 423 .SH COLUMNS
 424 .sp
 425 .LP
 426 Column names are case insensitive. The default output format is equivalent to
 427 "\fB-o\fR \fBstate,stime,fmri\fR". The default sorting columns are \fBSTATE\fR,
 428 \fBSTIME\fR, \fBFMRI\fR.
 429 .sp
 430 .ne 2
 431 .na
 432 \fB\fBCTID\fR\fR
 433 .ad
 434 .RS 10n
 435 The primary contract ID for the service instance. Not all instances have valid
 436 primary contract IDs.
 437 .RE
 438 
 439 .sp
 440 .ne 2
 441 .na
 442 \fB\fBDESC\fR\fR
 443 .ad
 444 .RS 10n
 445 A brief description of the service, from its template element. A service might


 590 The state of the service instance. An asterisk is appended for instances in
 591 transition, unless the \fBNSTA\fR or \fBNSTATE\fR column is also being
 592 displayed.
 593 .sp
 594 See \fBsmf\fR(5) for an explanation of service states.
 595 .RE
 596 
 597 .sp
 598 .ne 2
 599 .na
 600 \fB\fBSTIME\fR\fR
 601 .ad
 602 .RS 10n
 603 If the service instance entered the current state within the last 24 hours,
 604 this column indicates the time that it did so. Otherwise, this column indicates
 605 the date on which it did so, printed with underscores (\fB_\fR) in place of
 606 blanks.
 607 .RE
 608 
 609 .SH EXAMPLES
 610 .LP
 611 \fBExample 1 \fRDisplaying the Default Output
 612 .sp
 613 .LP
 614 This example displays default output:
 615 
 616 .sp
 617 .in +2
 618 .nf
 619 example% svcs
 620 STATE          STIME    FMRI
 621 \&...
 622 legacy_run     13:25:04 lrc:/etc/rc3_d/S42myscript
 623 \&...
 624 online         13:21:50 svc:/system/svc/restarter:default
 625 \&...
 626 online         13:25:03 svc:/milestone/multi-user:default
 627 \&...
 628 online         13:25:07 svc:/milestone/multi-user-server:default
 629 \&...
 630 .fi


 750 .sp
 751 .in +2
 752 .nf
 753 example$ svcs -xv nfs/client
 754 svc:/network/nfs/client:default (NFS client)
 755  State: offline since Mon Feb 27 16:03:23 2006
 756 Reason: Service svc:/network/nfs/status:default
 757         is not running because a method failed repeatedly.
 758    See: http://illumos.org/msg/SMF-8000-GE
 759   Path: svc:/network/nfs/client:default
 760           svc:/network/nfs/nlockmgr:default
 761             svc:/network/nfs/status:default
 762    See: man -M /usr/share/man -s 1M mount_nfs
 763    See: /var/svc/log/network-nfs-client:default.log
 764 Impact: This service is not running.
 765 .fi
 766 .in -2
 767 .sp
 768 
 769 .SH EXIT STATUS
 770 .sp
 771 .LP
 772 The following exit values are returned:
 773 .sp
 774 .ne 2
 775 .na
 776 \fB\fB0\fR\fR
 777 .ad
 778 .RS 5n
 779 Successful command invocation.
 780 .RE
 781 
 782 .sp
 783 .ne 2
 784 .na
 785 \fB\fB1\fR\fR
 786 .ad
 787 .RS 5n
 788 Fatal error.
 789 .RE
 790 
 791 .sp
 792 .ne 2
 793 .na
 794 \fB\fB2\fR\fR
 795 .ad
 796 .RS 5n
 797 Invalid command line options were specified.
 798 .RE
 799 
 800 .SH ATTRIBUTES
 801 .sp
 802 .LP
 803 See \fBattributes\fR(5) for descriptions of the following attributes:
 804 .sp
 805 
 806 .sp
 807 .TS
 808 box;
 809 c | c
 810 l | l .
 811 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 812 _
 813 Interface Stability     See below.
 814 .TE
 815 
 816 .sp
 817 .LP
 818 Screen output is Uncommitted. The invocation is Committed.
 819 .SH SEE ALSO
 820 .sp
 821 .LP
 822 \fBps\fR(1), \fBsvcprop\fR(1), \fBsvcadm\fR(1M), \fBsvccfg\fR(1M),
 823 \fBsvc.startd\fR(1M), \fBstat\fR(2), \fBlibscf\fR(3LIB), \fBattributes\fR(5),
 824 \fBfnmatch\fR(5), \fBsmf\fR(5), \fBzones\fR(5)
   1 '\" te
   2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
   3 .\" Copyright 2020 Joyent, Inc.
   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.
   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.
   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]
   7 .TH SVCS 1 "May 11, 2020"
   8 .SH NAME
   9 svcs \- report service status
  10 .SH SYNOPSIS

  11 .nf
  12 \fBsvcs\fR [\fB-aHpv?\fR] [\fB-Z\fR | \fB-z\fR \fIzone\fR] [\fB-o\fR \fIcol\fR[,\fIcol\fR]]... [\fB-R\fR \fIFMRI-instance\fR]...
  13      [\fB-sS\fR \fIcol\fR]... [\fIFMRI\fR | \fIpattern\fR]...
  14 .fi
  15 
  16 .LP
  17 .nf
  18 \fBsvcs\fR {\fB-d\fR | \fB-D\fR} [\fB-Hpv?\fR] [\fB-Z\fR | \fB-z\fR \fIzone\fR] [\fB-o\fR \fIcol\fR[,\fIcol\fR]]... [\fB-sS\fR \fIcol\fR]...
  19      [\fIFMRI\fR | \fIpattern\fR] ...
  20 .fi
  21 
  22 .LP
  23 .nf
  24 \fBsvcs\fR [\fB-l\fR | \fB-L\fR] [\fB-vZ\fR] [\fB-z\fR \fIzone\fR] [\fIFMRI\fR | \fIpattern\fR]...
  25 .fi
  26 
  27 .LP
  28 .nf
  29 \fBsvcs\fR \fB-x\fR [\fB-v\fR] [\fB-Z\fR | \fB-z\fR \fIzone\fR] [\fIFMRI\fR]...
  30 .fi
  31 
  32 .SH DESCRIPTION


  33 The \fBsvcs\fR command displays information about service instances as recorded
  34 in the service configuration repository.
  35 .sp
  36 .LP
  37 The first form of this command prints one-line status listings for service
  38 instances specified by the arguments. Each instance is listed only once. With
  39 no arguments, all enabled service instances, even if temporarily disabled, are
  40 listed with the columns indicated below.
  41 .sp
  42 .LP
  43 The second form prints one-line status listings for the dependencies or
  44 dependents of the service instances specified by the arguments.
  45 .sp
  46 .LP
  47 The third form prints detailed information about specific services and
  48 instances.
  49 .sp
  50 .LP
  51 The fourth form explains the states of service instances. For each argument, a
  52 block of human-readable text is displayed which explains what state the service
  53 is in, and why it is in that state. With no arguments, problematic services are
  54 described.
  55 .sp
  56 .LP
  57 Error messages are printed to the standard error stream.
  58 .sp
  59 .LP
  60 The output of this command can be used appropriately as input to the
  61 \fBsvcadm\fR(1M) command.
  62 .SH OPTIONS


  63 The following options are supported:
  64 .sp
  65 .ne 2
  66 .na
  67 \fB\fB-?\fR\fR
  68 .ad
  69 .RS 20n
  70 Displays an extended usage message, including column specifiers.
  71 .RE
  72 
  73 .sp
  74 .ne 2
  75 .na
  76 \fB\fB-a\fR\fR
  77 .ad
  78 .RS 20n
  79 Show all services, even disabled ones. This option has no effect if services
  80 are selected.
  81 .RE
  82 


 191 .RE
 192 
 193 See \fBsmf\fR(5) for additional details about dependencies, grouping, and
 194 \fBrestart_on\fR values.
 195 .RE
 196 
 197 .sp
 198 .ne 2
 199 .na
 200 \fB\fBenabled\fR\fR
 201 .ad
 202 .RS 14n
 203 Whether the service is enabled or not, and whether it is enabled or disabled
 204 temporarily (until the next system reboot). The former is specified as either
 205 \fBtrue\fR or \fBfalse\fR, and the latter is designated by the presence of
 206 \fB(temporary)\fR.
 207 .sp
 208 A service might be temporarily disabled because an administrator has run
 209 \fBsvcadm disable -t\fR, used \fBsvcadm milestone\fR, or booted the system to a
 210 specific milestone. See \fBsvcadm\fR(1M) for details.
 211 .sp
 212 If a service instance was disabled via
 213 \fBsvcadm disable -c\fR
 214 , then the provided comment will also be displayed.
 215 .RE
 216 
 217 .RE
 218 
 219 .sp
 220 .ne 2
 221 .na
 222 \fB-L\fR
 223 .ad
 224 .RS 20n
 225 Display the log file of the selected services and service instances, one
 226 per-line.
 227 .RE
 228 
 229 .sp
 230 .ne 2
 231 .na
 232 \fB\fB-o\fR \fIcol\fR[,\fIcol\fR]...\fR
 233 .ad
 234 .RS 20n


 320 .na
 321 \fB-z \fIzone\fR
 322 .ad
 323 .RS 20n
 324 Display only the services in the \fIzone\fR.  This option is only applicable
 325 in the global zone, see \fBzones\fR(5).
 326 .RE
 327 
 328 .sp
 329 .ne 2
 330 .na
 331 \fB-Z\fR
 332 .ad
 333 .RS 20n
 334 Display services from all zones, with an additional column indicating in which
 335 zone the service is running.  This option is only applicable in the global
 336 zone, see \fBzones\fR(5).
 337 .RE
 338 
 339 .SH OPERANDS


 340 The following operands are supported:
 341 .sp
 342 .ne 2
 343 .na
 344 \fB\fIFMRI\fR\fR
 345 .ad
 346 .RS 17n
 347 A fault management resource identifier (FMRI) that specifies one or more
 348 instances (see \fBsmf\fR(5)). FMRIs can be abbreviated by specifying the
 349 instance name, or the trailing portion of the service name. For example, given
 350 the FMRI:
 351 .sp
 352 .in +2
 353 .nf
 354 svc:/network/smtp:sendmail
 355 .fi
 356 .in -2
 357 .sp
 358 
 359 The following are valid abbreviations:


 402 .nf
 403 qexample% svcs \e*keyserv\e*
 404 STATE          STIME     FMRI
 405 disabled       Aug_02    svc:/network/rpc/keyserv:default
 406 .fi
 407 .in -2
 408 .sp
 409 
 410 .RE
 411 
 412 .sp
 413 .ne 2
 414 .na
 415 \fB\fIFMRI-instance\fR\fR
 416 .ad
 417 .RS 17n
 418 An FMRI that specifies an instance.
 419 .RE
 420 
 421 .SH COLUMNS


 422 Column names are case insensitive. The default output format is equivalent to
 423 "\fB-o\fR \fBstate,stime,fmri\fR". The default sorting columns are \fBSTATE\fR,
 424 \fBSTIME\fR, \fBFMRI\fR.
 425 .sp
 426 .ne 2
 427 .na
 428 \fB\fBCTID\fR\fR
 429 .ad
 430 .RS 10n
 431 The primary contract ID for the service instance. Not all instances have valid
 432 primary contract IDs.
 433 .RE
 434 
 435 .sp
 436 .ne 2
 437 .na
 438 \fB\fBDESC\fR\fR
 439 .ad
 440 .RS 10n
 441 A brief description of the service, from its template element. A service might


 586 The state of the service instance. An asterisk is appended for instances in
 587 transition, unless the \fBNSTA\fR or \fBNSTATE\fR column is also being
 588 displayed.
 589 .sp
 590 See \fBsmf\fR(5) for an explanation of service states.
 591 .RE
 592 
 593 .sp
 594 .ne 2
 595 .na
 596 \fB\fBSTIME\fR\fR
 597 .ad
 598 .RS 10n
 599 If the service instance entered the current state within the last 24 hours,
 600 this column indicates the time that it did so. Otherwise, this column indicates
 601 the date on which it did so, printed with underscores (\fB_\fR) in place of
 602 blanks.
 603 .RE
 604 
 605 .SH EXAMPLES

 606 \fBExample 1 \fRDisplaying the Default Output
 607 .sp
 608 .LP
 609 This example displays default output:
 610 
 611 .sp
 612 .in +2
 613 .nf
 614 example% svcs
 615 STATE          STIME    FMRI
 616 \&...
 617 legacy_run     13:25:04 lrc:/etc/rc3_d/S42myscript
 618 \&...
 619 online         13:21:50 svc:/system/svc/restarter:default
 620 \&...
 621 online         13:25:03 svc:/milestone/multi-user:default
 622 \&...
 623 online         13:25:07 svc:/milestone/multi-user-server:default
 624 \&...
 625 .fi


 745 .sp
 746 .in +2
 747 .nf
 748 example$ svcs -xv nfs/client
 749 svc:/network/nfs/client:default (NFS client)
 750  State: offline since Mon Feb 27 16:03:23 2006
 751 Reason: Service svc:/network/nfs/status:default
 752         is not running because a method failed repeatedly.
 753    See: http://illumos.org/msg/SMF-8000-GE
 754   Path: svc:/network/nfs/client:default
 755           svc:/network/nfs/nlockmgr:default
 756             svc:/network/nfs/status:default
 757    See: man -M /usr/share/man -s 1M mount_nfs
 758    See: /var/svc/log/network-nfs-client:default.log
 759 Impact: This service is not running.
 760 .fi
 761 .in -2
 762 .sp
 763 
 764 .SH EXIT STATUS


 765 The following exit values are returned:
 766 .sp
 767 .ne 2
 768 .na
 769 \fB\fB0\fR\fR
 770 .ad
 771 .RS 5n
 772 Successful command invocation.
 773 .RE
 774 
 775 .sp
 776 .ne 2
 777 .na
 778 \fB\fB1\fR\fR
 779 .ad
 780 .RS 5n
 781 Fatal error.
 782 .RE
 783 
 784 .sp
 785 .ne 2
 786 .na
 787 \fB\fB2\fR\fR
 788 .ad
 789 .RS 5n
 790 Invalid command line options were specified.
 791 .RE
 792 
 793 .SH ATTRIBUTES


 794 See \fBattributes\fR(5) for descriptions of the following attributes:
 795 .sp
 796 
 797 .sp
 798 .TS
 799 box;
 800 c | c
 801 l | l .
 802 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 803 _
 804 Interface Stability     See below.
 805 .TE
 806 
 807 .sp
 808 .LP
 809 Screen output is Uncommitted. The invocation is Committed.
 810 .SH SEE ALSO


 811 \fBps\fR(1), \fBsvcprop\fR(1), \fBsvcadm\fR(1M), \fBsvccfg\fR(1M),
 812 \fBsvc.startd\fR(1M), \fBstat\fR(2), \fBlibscf\fR(3LIB), \fBattributes\fR(5),
 813 \fBfnmatch\fR(5), \fBsmf\fR(5), \fBzones\fR(5)