Determining UNIX service states
By DaveLevy on Aug 02, 2006
On both my Qube (Linux) and Laptop (Solaris), I have been installing shared services, such as Postgres, Sybase and snipsnap, and thus considering how to manage them. I have wanted the excuse to write an SMF(5) compliant script and so have been working on one.
One of the key methods required is the
status method which I have after discussion with colleagues, decided has three states. These correspond to a Jackson Backtracking problem, since one state is an error state. This can only be defined as a not running, not stopped state. The diagram below shows the JSP structure diagram.
The reason it's a backtracking problem is that you can't tell if its an error state until after you have tested for the other two good states.