Quoth Darren Reed on Thu, Jun 15, 2006 at 04:43:44PM +0800:
> While I'm thinking of useful changes to SMF, can it capture all
> output sent to the console, directly, by services?
> 
> So if the startup scripts for a service do 'echo foo > /dev/console',
> can that be captured?

Technically, service scripts are supposed to pipe such messages to the
smf_console() function defined in /lib/svc/share/smf_include.sh .  Then
you can define $SMF_MSGLOG_REDIRECT to direct the messages to a file.
This won't get binaries which write directly to the console, though.
For that, you'd need a generic console capture mechanism.  consadm & cvc
redirect, but it looks like they don't capture.

> And further to this, is it possible to generate a single output
> file of all of the stdout/stderr from services as they boot up?
> 
> Although this can be something like a plate of scrambled eggs,
> it can be useful to have in a single place all of the output from
> services started (or attempted to start) at bootup, in an order
> that is roughly equivalent to that in which they were generated in.
> Yes, I've seen this mode of operation elsewhere but they only had
> a more developed SVR4 rc system, not SMF.

Is this just to debug service startup-order problems?


David

Reply via email to