Wednesday, 20 February 2013

Solaris - finding and restarting services

The other day I was looking to restart a service on a Solaris 10 server as a management console was reporting that is couldn't connect to the service.

(In this example I'm looking for all Sophos services)

# svcs -a | grep sophos

online         Feb_18   svc:/com/sophos/sav/sav-protect:default
online         11:09:43 svc:/com/sophos/sav/sav-update:default
online         11:51:47 svc:/com/sophos/sav/sav-rms:default

So I've found the services: How do I restart one?

# svcadm restart svc:/com/sophos/sav/sav-rms:default

Or using its short unique name:

# svcadm restart sav-rms

online         Feb_18   svc:/com/sophos/sav/sav-protect:default
online         11:09:43 svc:/com/sophos/sav/sav-update:default
online         11:51:47 svc:/com/sophos/sav/sav-rms:default

The service should now be back online but what happens when the service doesn't comeback as online?
You have to enable the service if it goes into maintenance (not sure why this happened as I had run the same command on other servers without the service going into maintenance).

online         Feb_18   svc:/com/sophos/sav/sav-protect:default
online         11:09:43 svc:/com/sophos/sav/sav-update:default
maintenance11:51:47 svc:/com/sophos/sav/sav-rms:default

# svcadm enable sav-rms

online         Feb_18   svc:/com/sophos/sav/sav-protect:default
online         11:09:43 svc:/com/sophos/sav/sav-update:default
online         11:51:47 svc:/com/sophos/sav/sav-rms:default

No comments:

Post a Comment