-bash-3.00# which svcadm
/usr/sbin/svcadm
-bash-3.00# svcadm
Usage: svcadm [-v] [cmd [args ... ]]
svcadm enable [-rst]
svcadm disable [-st]
svcadm restart
svcadm refresh
svcadm mark [-It]
svcadm clear
svcadm milestone [-d]
Services can be specified using an FMRI, abbreviation, or fnmatch(5)
pattern, as shown in these examples for svc:/network/smtp:sendmail
svcadm
svcadm
svcadm
svcadm
svcadm
svcadm
svcadm
-bash-3.00#
Maintenance mode: Example Upgrade a service
Once completed maintenance mode, you have to clear
#### Service Management with svcadm ######
Disable service:
svcadm disable FMRI
svcadm disable -s FMRI – stops each service instance
svcadm disable -s sendmail – stop default instance
svcadm disable -t FMRI – effects temporary disable ( when systems reboots it will start )
Note: svcadm really delegates service management to default restarter. i.e. svc.startd
0-bash-3.00# grep svc /etc/inittab
# For modifying parameters passed to ttymon, use svccfg(1m) to modify
# # svccfg
# svc:> select system/console-login
# svc:/system/console-login> setprop ttymon/terminal_type = "xterm"
# svc:/system/console-login> exit
smf::sysinit:/lib/svc/bin/svc.startd >/dev/msglog 2<>/dev/msglog
Enable service:
svcadm enable FMRI - enables FMRI accross ALL reboots
svcadm enable -t FMRI - enables FMRI for current sessions ( test, developers )
svcadm enable -r FMRI - ALL dependencies are enabled ( recursive switch )
svcadm enable -s FMRI - enables each service instance
svcadm -v refresh smtp ( reread configuration files of smtp, same PID)
svcadm -v restart smtp ( new PIDS)
PIDS
-bash-3.00# svcs -p smtp
STATE STIME FMRI
online 0:36:17 svc:/network/smtp:sendmail
0:36:17 1219 sendmail
0:36:17 1220 sendmail