Configuring SMF services to write to the console during boot


I like several things about the Solaris service management facility (SMF), but one thing I don’t care for is SMF redirecting the output from startup scripts to logfiles in /etc/svc/volatile and /var/svc/log. Call me old fashion, but I like to view the boot progress on the console, and periodically use the console output to troubleshoot problems with the boot process. That said, it is possible to get the system services to log to the console during boot, but it requires hacking /etc/rc[0-6] to write to /dev/sysmsg instead of STDOUT. For individual startup scripts, you can add entries similar to the following to have output displayed on the console during boot:

echo “Writing to the console” > /dev/sysmsg

Console output is an extremely useful debugging tool, and I really wish you could pass an option ( boot -vx doesn’t cut it) to the kernel to tell SMF to write to the console instead of individual logfiles.

This article was posted by Matty on 2007-01-06 14:48:00 -0400 -0400