Frank Hofmann wrote:
On Mon, 21 May 2007, [EMAIL PROTECTED] wrote:
Frank Hofmann wrote:
On Mon, 21 May 2007, snow wrote:
In Kernel module coding,we offten use cmn_err,but where can i find
the info it put
It goes to a kernel streams queue that syslogd(1M) reads out and, in
normal system operation, writes into /var/adm/messages. You can
force a direct immediate read from the system command line by
dmesg(1M). If you happen to have had a system crash that you'd like
to troubleshoot, the latest system message buffer can be accessed
from [k]mdb via the "::msgbuf" dcmd. On lowest-level (showing how
the information is arranged in-kernel), it'd be:
*log_recentq::print queue_t q_first | \
::walk b_next | \
::walk b_cont | \
::print mblk_t b_rptr | \
/S
You might also want to look at the cmn_err(9f) man page. Depending
on the first character in the format string, the output might only go
to the console and not the message buf. Here is the section of the
manual page describing this:
It will always go into the message buffer. It might not go into
/var/adm/messages, though.
FrankH.
oops. right you are.
max
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code