Openunix.eu


Solaris

svcs - information about service

# svcs Show all enabled services
# svcs -a Show all services
# svcs -p Show all associated processes
# svcs -l system/cron List details about a service.
# svcs -xv To display broken services and the reason behind it:
# svcs -d /system/filesystem/local check which systems I depend on
# svcs -D /system/filesystem/local check which services depend on me
# svcs milestone* Status of loaded milestones.

SMF configuration files and directories

/etc/svc/repository.db The actual database of SMF
/etc/svc/volatile Logs for early booting issues
/lib/svc/bin/svc.startd Master restarter daemon
/lib/svc/bin/svc.configd Repository daemon
/var/svc/manifest/system Service XML files
/lib/svc/method Startup shell script
/var/svc/log Service log files are stored here

svcadm - service start/stop

Now that we’ve looked at the services and FMRI of the services, we can enable/disable the services using the svcadm command. Make sure all the required dependency service are online before you online the service.

# svcadm enable [service] To enable a service
# svcadm disable [service] To disable a service
# svcadm disable -t [service] Temporarily disable a service untill next reboot
# svcadm clear [service] To clear a service in maintenance mode
# svcadm refresh [service] To refresh service to re-read the configuration files.
# svcadm restart [service] To restart the service

svcprop - retrieving service configuration properties

# svcprop -p [property] [service]

For example, to displays the shell script that starts the cron daemon :

# svcprop -p start/exec system/cron /lib/svc/method/svc-cron

svccfg - import, export, and modify service configurations

svccfg -s dns/client setprop config/domain = astring: "myhost.org"
svccfg -s dns/client setprop config/nameserver=net_address: 192.168.1.1
svccfg -s name-service/switch setprop config/host = astring: '"files dns"'

source:https://www.thegeekdiary.com/a-beginners-guide-to-service-management-facility-smf-in-solaris/

 

Powered by NetBSD. Running on a toaster.