stop/start syslogd on Solaris (updated)

By default, syslogd is started when the system boots. This post provides a quick how to stop and start the syslogd on Solaris when required. This article covers Solaris versions from 7 through to Solaris 11.

Updated [2007-05-22] for Solaris 9, [2008-04-18] to include Solaris 10 and [2014-05-19] to include Solaris 11.

For an overview on the Solaris System Log, you can review my post Solaris System log (syslogd) overview

Solaris 7, 8 and Solaris 9

On Solaris 7, 8 and 9 the start/stop scripts are stored in /etc/init.d so the easiest way to stop/start syslogd is to perform:

  • Stop syslogd:
    # /etc/init.d/syslog stop
  • Start syslogd:
    # /etc/init.d/syslog start
  • Checking status:
    # ps -ef | grep syslogd
  • Restart after configuration changes (/etc/syslog.conf):
    # /etc/init.d/syslog stop
    # /etc/init.d/syslog start

Solaris 10 and 11

With the introduction of SMF we use the following to start/stop syslog under Solaris 10

  • To start syslog
    # svcadm enable svc:/system/system-log
  • To stop syslog
    # svcadm disable svc:/system/system-log
  • Checking status:
    # svcs -l svc:/system/system-log
  • Refresh the daemon after configuration changes (/etc/syslog.conf):
    # svcadm refresh svc:/system/system-log
  • Restarting the daemon:
    # svcadm restart svc:/system/system-log

For Solaris 10 and 11 use the -t flag to temporary enable/disable syslog until the next reboot