This is my first post on Solaris. I am sharing my knowledge on service management part of Solaris. Command given in this article is tested on Solaris 10 and Solaris 11.
Solaris services are managed through SMF (Service Management Facility). SMF is completely different from init.d style services. There are a few commands such as svcs, svcadm, svccfg etc which can be used to manage services in Solaris. Without going into internals of SMF, I am trying to explain SMF structure through commands
Suppose you are on a Solaris system and you want to get status of a particular service. To get status of a particular service you can use the command svcs , here in below output svcs command has been used to get state of service ssh
As you can see, state of the service is online. online is one of the status, there are other states as well such as maintenance (refer below screenshot).
Major state of a services could be disabled, online, offline or maintenance. Disabled state keep service off (don’t run). Online is ideal state for a service which need to be run. If the service is in online state then functionality of the service will be available. offline and maintenance is not a ideal state. Offline state represent failure of service, there could be multiple reasons of offline state. One of the reason could be offline/maintenance state of service on which that particular service is depending. Maintenance state of service indicates problem is that particular service. System admin need to troubleshoot services in maintenance mode by looking into output of svcs -xv command. Log files are also very helpful in troubleshooting service related issues, I will discuss log based troubleshooting in coming post.