How to manage services in Solaris 10

svcs command

System administrators can more easily monitor services using Solaris Service Manager’s service status information and service activation/deactivation interfaces based on the commands (svcs, svcadm, etc). Until Solaris 9, it was a complicated procedure to understand service status. Service level information was not provided and system administrators have to assume service status from their own analysis of kernel level information. A slow and error prone process.


svcadm command

Services and the services on which they depend are started in their appropriate order using the Solaris Service Manager svcadm command. System administrators are longer required to run complicated service startup operations.


With Solaris 10 the traditional service stop procedure using the kill or pkill commands is no longer available. This is because, once stopped, Solaris Service Manager will automatically restart them. So a new command, svcadm is now used for stopping services.
 
 
References

Solaris 9 or earlier versions Solaris 10
Service status ps(1) command
(only process information is shown)
svcs(1) or ps(1) command
Service stop # /etc/init.d/cron stop # svcadm disable -t
system/cron:default
Service restart (temporary) # /etc/init.d cron start # svcadm enable -t
system/cron:default
Service stop
After service restart the service isn't started
(1)# /etc/init.d/cron stop
(2)# mv /etc/rc2.d/S75cron /etc/rc2.d/_S75cron
(Need to rename the service start script)
# svcadm disable -t
system/cron:default
Service restart (permanent) (1) # /etc/init.d/cron stop
(2) # /etc/init.d/cron start
# svcadm restart -t
system/cron:default