#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    38
    Rep Power
    2

    Solaris SMF service monitoring


    Hi, guys, I need some help about the Solaris SMF on how it monitors it services. I added a service which is a shell script that launches a perl script. Now using the command:

    Code:
    svcadm enable myservice
    It will start the perl script, if I do a:

    Code:
    ps -ef | grep myservice
    It is there. When checking the status:

    Code:
    svcs | grep myservice
    I see myservice in 'online' state. Now, I do a kill -9 PID of myservice and myservice no longer appears when I do a ps -ef however, it still appears as online in svcs. How do Solaris check for faults for this service? Is there something I need to do so Solaris will make sure the service is running?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    38
    Rep Power
    2
    Originally Posted by jaimitoc30
    Hi, guys, I need some help about the Solaris SMF on how it monitors it services. I added a service which is a shell script that launches a perl script. Now using the command:

    Code:
    svcadm enable myservice
    It will start the perl script, if I do a:

    Code:
    ps -ef | grep myservice
    It is there. When checking the status:

    Code:
    svcs | grep myservice
    I see myservice in 'online' state. Now, I do a kill -9 PID of myservice and myservice no longer appears when I do a ps -ef however, it still appears as online in svcs. How do Solaris check for faults for this service? Is there something I need to do so Solaris will make sure the service is running?
    Well, if somebody wondered how I resolved this, I needed to modify the manifest file for the service. This is what needed to be modified:

    <property_group name='startd' type='framework'>
    <propval name='duration' type='astring' value='contract' />
    </property_group>

    under value it should be contact. Contract is some type of address reservation for child processes, so it knows which processes are child of the service.

IMN logo majestic logo threadwatch logo seochat tools logo