# svcs -a
: Lists all services currently installed, including their state.
# svcs -d FMRI
: Lists dependencies for FMRI.
# svcs -D FMRI
: Lists dependents for FMRI.
# svcs -l FMRI
: Provides a long listing of information about FMRI; includes
dependency information
# svcs -p FMRI
: Shows relationships between services and processes.
# svcs -t
: This change is temporary (does not persist past a boot).
# svcs -x
: Explains why a service is not available.
# svcs -xv
: Verbose debugging information.
svcadm
# /usr/sbin/svcadm -v enable [-rst] {FMRI | pattern}
:Enables the service instances specified
# /usr/sbin/svcadm -v disable [-st] {FMRI | pattern}
: Disables the service instance specified by the operands
# /usr/sbin/svcadm -v restart {FMRI | pattern}
: Requests that the service instances specified by the operands be restarted.
# /usr/sbin/svcadm -v refresh {FMRI | pattern}
: For each service instance specified by the operands,requests that the assigned restarter update the
service's running configuration snapshot with the values from the current configuration.
# /usr/sbin/svcadm -v clear {FMRI | pattern}
: For each service instance specified by the operands, if the instance is in the maintenance state, signal to the
assigned restarter that the service has been repaired.If the instance is in the degraded state, request that
the assigned restarter take the service to the online state.
# /usr/sbin/svcadm -v mark [-It] instance_state {FMRI | pattern}
: If instance_state is "maintenance", then for each service specified by the operands, svcadm requests that the
assigned restarter place the service in the maintenancestate.
Eg:- svcadm -v mark -t maintenance telnet
marks the telnet service as in maintenance mode
: If instance_state is "degraded", then for services specified by the operands in the online state, svcadm
requests that the restarters assigned to the services move them into the degraded state.
# /usr/sbin/svcadm [-v] milestone [-d] milestone_FMRI
Eg:-
1. The following command restricts the running services to single user mode:
# svcadm milestone milestone/single-user
2. The following command restores the running services:
# svcadm milestone all
Options:
enable [-rst]
-r : svcadm enables each service instance and recursively enables its dependencies
-s : svcadm enables each service instance and then waits for each service instance
to enter the online or degraded state. svcadm will return early if it determines that the service cannot
reach these states without administrator intervention.
-t : svcadm temporarily enables each service instance. Temporary enable only
lasts until reboot
disable [-st]
-s : svcadm disables each service instance and then waits for each service instance
to enter the disabled state. svcadm will return early if it determines that the service cannot reach this state
without administrator intervention
-t : option is specified, svcadm temporarily disables each service instance. Temporary disable only
lasts until reboot.
mark [-It]
-I : option is specified, the request is flagged as immediate
-t : Perform temporarily
Inetadm
# inetadm
The inetadm utility provides the following capabilities for
inetd-managed SMF services:
o Provides a list of all such services installed.
o Lists the services' properties and values.
o Allows enabling and disabling of services.
o Allows modification of the services'property
values, as well as the default values provided by
inetd.
Options:
-p
Lists all default inet service property values provided
by inetd in the form of name=value pairs. If the value
is of boolean type, it is listed as TRUE or FALSE.
-l {FMRI | pattern}...
List all properties for the specified service instances
as name=value pairs. In addition, if the property value
is inherited from the default value provided by inetd,
the name=value pair is identified by the token
(default). Property inheritance occurs when properties
do not have a specified service instance default.
-e {FMRI | pattern}...
Enable the specified service instances.
-d {FMRI | pattern}...
Disable the specified service instances.
-m {FMRI | pattern}...{name=value}...
Change the values of the specified properties of the
identified service instances. Properties are specified
as whitespace-separated name=value pairs. To remove an
instance-specific value and accept the default value for
a property, simply specify the property without a value,
for example, name= .
-M {name=value}...
Change the values Globally (default properties).
Properties are specified as whitespace-separated name=value pairs.
Examples:
# inetadm -l network/rpc/spray:default
inetconv
The inetconv utility converts a file containing records of inetd.conf into smf service
manifests, and then import those manifests into the smf repository. Once the inetd.conf file has been converted,
the only way to change aspects of an inet service is to use the inetadm utility.
Example:
Adding the Swat to inetadmin
create a file containing a valid inted.conf-style entry for swat
#vi example /inet.swat
--------------------
swat stream tcp nowait root /usr/sfw/sbin/swat swat
--------------------
Now run inetconv as follows:-
# inetconv -i /inet.swat
swat -> /var/svc/manifest/network/swat-tcp.xml
Importing swat-tcp.xml ...Done
Now swat can be enabled (Note the service name):-
# inetadm -e
svc:/network/swat/tcp:default