[OpenIndiana-discuss] Debugging systems startup
Jim Klimov
jimklimov at cos.ru
Mon Oct 1 10:57:43 UTC 2012
I want to inject some echo's into my SMF startup scripts to
report about the progress of my systems startup (and possible
problems). Actually I did that, and "echo... > /dev/console"
if a special flag-file exists in the /etc/ filesystem.
1) I wanted to make this mechanism more convenient by also
logging the information if the kernel was booted with the
"-m verbose" or "-v" option; how can a userland program
query the options passed to OI kernel?
2) Also, echoing to /dev/console does not put the messages
into (local or remote) syslog files. What do the big boys
do to properly report things to both syslog and console -
issue the string writes twice (echo to console and pipe to
"logger"), or is there some standard utility which can
output the same logging output to several logging sinks,
including the console and syslog, perhaps SNMP traps and
whatnot else?
3) Is there a good way to differentiate the "physical" and
"serial" consoles, as to address and write to both of them
if available? I know that I can write to /dev/term/a when
running with a physical console, but I can't be certain in
advance that on a particular system this port is plugged
as a remote or serial console. And I'm not sure which TTY
name addresses the physical screen when the kernel system
console from the boot is attached to serial port.
Thanks,
//Jim Klimov
More information about the OpenIndiana-discuss
mailing list