SVCS(1) User Commands SVCS(1) NNAAMMEE svcs - report service status SSYYNNOOPPSSIISS ssvvccss [--aaHHppvv??] [--ZZ | --zz _z_o_n_e] [--oo _c_o_l[,_c_o_l]]... [--RR _F_M_R_I_-_i_n_s_t_a_n_c_e]... [--ssSS _c_o_l]... [_F_M_R_I | _p_a_t_t_e_r_n]... ssvvccss {--dd | --DD} [--HHppvv??] [--ZZ | --zz _z_o_n_e] [--oo _c_o_l[,_c_o_l]]... [--ssSS _c_o_l]... [_F_M_R_I | _p_a_t_t_e_r_n] ... ssvvccss [--ll | --LL] [--vvZZ] [--zz _z_o_n_e] [_F_M_R_I | _p_a_t_t_e_r_n]... ssvvccss --xx [--vv] [--ZZ | --zz _z_o_n_e] [_F_M_R_I]... DDEESSCCRRIIPPTTIIOONN The ssvvccss command displays information about service instances as recorded in the service configuration repository. The first form of this command prints one-line status listings for service instances specified by the arguments. Each instance is listed only once. With no arguments, all enabled service instances, even if temporarily disabled, are listed with the columns indicated below. The second form prints one-line status listings for the dependencies or dependents of the service instances specified by the arguments. The third form prints detailed information about specific services and instances. The fourth form explains the states of service instances. For each argument, a block of human-readable text is displayed which explains what state the service is in, and why it is in that state. With no arguments, problematic services are described. Error messages are printed to the standard error stream. The output of this command can be used appropriately as input to the ssvvccaaddmm(1M) command. OOPPTTIIOONNSS The following options are supported: --?? Displays an extended usage message, including column specifiers. --aa Show all services, even disabled ones. This option has no effect if services are selected. --dd Lists the services or service instances upon which the given service instances depend. --DD Lists the service instances that depend on the given services or service instances. --HH Omits the column headers. --ll (The letter ell.) Displays all available information about the selected services and service instances, with one service attribute displayed for each line. Information for different instances are separated by blank lines. The following specific attributes require further explanation: ddeeppeennddeennccyy Information about a dependency. The grouping and rreessttaarrtt__oonn properties are displayed first and are separated by a forward slash (//). Next, each entity and its state is listed. See ssmmff(5) for information about states. In addition to the standard states, each service dependency can have the following state descriptions: aabbsseenntt No such service is defined on the system. iinnvvaalliidd The fault management resource identifier (FMRI) is invalid (see ssmmff(5)). mmuullttiippllee The entity is a service with multiple instances. File dependencies can only have one of the following state descriptions: aabbsseenntt No such file on the system. oonnlliinnee The file exists. If the file did not exist the last time that ssvvcc..ssttaarrttdd evaluated the service's dependencies, it can consider the dependency to be unsatisfied. ssvvccaaddmm rreeffrreesshh forces dependency re-evaluation. uunnkknnoowwnn ssttaatt(2) failed for a reason other than EENNOOEENNTT. See ssmmff(5) for additional details about dependencies, grouping, and rreessttaarrtt__oonn values. eennaabblleedd Whether the service is enabled or not, and whether it is enabled or disabled temporarily (until the next system reboot). The former is specified as either ttrruuee or ffaallssee, and the latter is designated by the presence of ((tteemmppoorraarryy)). A service might be temporarily disabled because an administrator has run ssvvccaaddmm ddiissaabbllee --tt, used ssvvccaaddmm mmiilleessttoonnee, or booted the system to a specific milestone. See ssvvccaaddmm(1M) for details. If a service instance was disabled via ssvvccaaddmm ddiissaabbllee --cc , then the provided comment will also be displayed. --LL Display the log file of the selected services and service instances, one per-line. --oo _c_o_l[,_c_o_l]... Prints the specified columns. Each _c_o_l should be a column name. See CCOOLLUUMMNNSS below for available columns. --pp Lists processes associated with each service instance. A service instance can have no associated processes. The process ID, start time, and command name (PPIIDD, SSTTIIMMEE, and CCMMDD fields from ppss(1)) are displayed for each process. --RR _F_M_R_I_-_i_n_s_t_a_n_c_e Selects service instances that have the given service instance as their restarter. --ss _c_o_l Sorts output by column. _c_o_l should be a column name. See CCOOLLUUMMNNSS below for available columns. Multiple --ss options behave additively. --SS _c_o_l Sorts by _c_o_l in the opposite order as option --ss. --vv Without --xx or --ll, displays verbose columns: SSTTAATTEE, NNSSTTAATTEE, SSTTIIMMEE, CCTTIIDD, and FFMMRRII. With --xx, displays extra information for each explanation. With --ll, displays user-visible properties in property groups of type aapppplliiccaattiioonn and their description. --xx Displays explanations for service states. Without arguments, the --xx option explains the states of services which: o are enabled, but are not running. o are preventing another enabled service from running. --zz _z_o_n_e Display only the services in the _z_o_n_e. This option is only applicable in the global zone, see zzoonneess(5). --ZZ Display services from all zones, with an additional column indicating in which zone the service is running. This option is only applicable in the global zone, see zzoonneess(5). OOPPEERRAANNDDSS The following operands are supported: _F_M_R_I A fault management resource identifier (FMRI) that specifies one or more instances (see ssmmff(5)). FMRIs can be abbreviated by specifying the instance name, or the trailing portion of the service name. For example, given the FMRI: svc:/network/smtp:sendmail The following are valid abbreviations: sendmail :sendmail smtp smtp:sendmail network/smtp The following are invalid abbreviations: mail network network/smt If the FMRI specifies a service, then the command applies to all instances of that service, except when used with the --DD option. Abbreviated forms of FMRIs are unstable, and should not be used in scripts or other permanent tools. _p_a_t_t_e_r_n A pattern that is matched against the _F_M_R_Is of service instances according to the "globbing" rules described by ffnnmmaattcchh(5). If the pattern does not begin with ssvvcc::, then ssvvcc::// is prepended. The following is a typical example of a glob pattern: qexample% svcs \*keyserv\* STATE STIME FMRI disabled Aug_02 svc:/network/rpc/keyserv:default _F_M_R_I_-_i_n_s_t_a_n_c_e An FMRI that specifies an instance. CCOOLLUUMMNNSS Column names are case insensitive. The default output format is equivalent to "--oo ssttaattee,,ssttiimmee,,ffmmrrii". The default sorting columns are SSTTAATTEE, SSTTIIMMEE, FFMMRRII. CCTTIIDD The primary contract ID for the service instance. Not all instances have valid primary contract IDs. DDEESSCC A brief description of the service, from its template element. A service might not have a description available, in which case a hyphen (--) is used to denote an empty value. FFMMRRII The _F_M_R_I of the service instance. IINNSSTT The instance name of the service instance. NNSSTTAA The abbreviated next state of the service instance, as given in the SSTTAA column description. A hyphen denotes that the instance is not transitioning. Same as SSTTAA otherwise. NNSSTTAATTEE The next state of the service. A hyphen is used to denote that the instance is not transitioning. Same as SSTTAATTEE otherwise. SSCCOOPPEE The scope name of the service instance. SSVVCC The service name of the service instance. SSTTAA The abbreviated state of the service instance (see ssmmff(5)): DDGGDD degraded DDIISS disabled LLRRCC legacy rrcc**..dd script-initiated instance MMNNTT maintenance OOFFFF offline OONN online UUNN uninitialized Absent or unrecognized states are denoted by a question mark (??) character. An asterisk (**) is appended for instances in transition, unless the NNSSTTAA or NNSSTTAATTEE column is also being displayed. See ssmmff(5) for an explanation of service states. SSTTAATTEE The state of the service instance. An asterisk is appended for instances in transition, unless the NNSSTTAA or NNSSTTAATTEE column is also being displayed. See ssmmff(5) for an explanation of service states. SSTTIIMMEE If the service instance entered the current state within the last 24 hours, this column indicates the time that it did so. Otherwise, this column indicates the date on which it did so, printed with underscores (__) in place of blanks. EEXXAAMMPPLLEESS EExxaammppllee 11 Displaying the Default Output This example displays default output: example% svcs STATE STIME FMRI ... legacy_run 13:25:04 lrc:/etc/rc3_d/S42myscript ... online 13:21:50 svc:/system/svc/restarter:default ... online 13:25:03 svc:/milestone/multi-user:default ... online 13:25:07 svc:/milestone/multi-user-server:default ... EExxaammppllee 22 Listing All Local Instances This example lists all local instances of the sseerrvviiccee11 service. example% svcs -o state,nstate,fmri service1 STATE NSTATE FMRI online - svc:/service1:instance1 disabled - svc:/service1:instance2 EExxaammppllee 33 Listing Verbose Information This example lists verbose information. example% svcs -v network/rpc/rstat:udp STATE NSTATE STIME CTID FMRI online - Aug_09 - svc:/network/rpc/rstat:udp EExxaammppllee 44 Listing Detailed Information This example lists detailed information about all instances of ssyysstteemm//sseerrvviiccee33. Additional fields can be displayed, as appropriate to the managing restarter. example% svcs -l network/rpc/rstat:udp fmri svc:/network/rpc/rstat:udp enabled true state online next_state none restarter svc:/network/inetd:default contract_id dependency require_all/error svc:/network/rpc/bind (online) EExxaammppllee 55 Listing Processes example% svcs -p sendmail STATE STIME FMRI online 13:25:13 svc:/network/smtp:sendmail 13:25:15 100939 sendmail 13:25:15 100940 sendmail EExxaammppllee 66 Explaining Service States Using ssvvccss --xx (a) In this example, ssvvccss --xx has identified that the print/server service being disabled is the root cause of two services which are enabled but not online. ssvvccss --xxvv shows that those services are pprriinntt//rrffcc11117799 and pprriinntt//iipppp--lliisstteenneerr. This situation can be rectified by either enabling pprriinntt//sseerrvveerr or disabling rrffcc11117799 and iipppp--lliisstteenneerr. example% svcs -x svc:/application/print/server:default (LP print server) State: disabled since Mon Feb 13 17:56:21 2006 Reason: Disabled by an administrator. See: http://illumos.org/msg/SMF-8000-05 See: lpsched(1M) Impact: 2 dependent services are not running. (Use -v for list.) (b) In this example, NFS is not working: example$ svcs nfs/client STATE STIME FMRI offline 16:03:23 svc:/network/nfs/client:default (c) The following example shows that the problem is nnffss//ssttaattuuss. nnffss//cclliieenntt is waiting because it depends on nnffss//nnlloocckkmmggrr, which depends on nnffss//ssttaattuuss: example$ svcs -xv nfs/client svc:/network/nfs/client:default (NFS client) State: offline since Mon Feb 27 16:03:23 2006 Reason: Service svc:/network/nfs/status:default is not running because a method failed repeatedly. See: http://illumos.org/msg/SMF-8000-GE Path: svc:/network/nfs/client:default svc:/network/nfs/nlockmgr:default svc:/network/nfs/status:default See: man -M /usr/share/man -s 1M mount_nfs See: /var/svc/log/network-nfs-client:default.log Impact: This service is not running. EEXXIITT SSTTAATTUUSS The following exit values are returned: 00 Successful command invocation. 11 Fatal error. 22 Invalid command line options were specified. AATTTTRRIIBBUUTTEESS See aattttrriibbuutteess(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Interface Stability | See below. | +--------------------+-----------------+ Screen output is Uncommitted. The invocation is Committed. SSEEEE AALLSSOO ppss(1), ssvvccpprroopp(1), ssvvccaaddmm(1M), ssvvccccffgg(1M), ssvvcc..ssttaarrttdd(1M), ssttaatt(2), lliibbssccff(3LIB), aattttrriibbuutteess(5), ffnnmmaattcchh(5), ssmmff(5), zzoonneess(5) May 11, 2020 SVCS(1)