JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
STREAMS Programming Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

Part I Application Programming Interface

1.  Overview of STREAMS

2.  STREAMS Application-Level Components

3.  STREAMS Application-Level Mechanisms

4.  Application Access to the STREAMS Driver and Module Interfaces

5.  STREAMS Administration

6.  Pipes and Queues

Part II Kernel Interface

7.  STREAMS Framework - Kernel Level

8.  STREAMS Kernel-Level Mechanisms

9.  STREAMS Drivers

10.  STREAMS Modules

11.  Configuring STREAMS Drivers and Modules

12.  Multithreaded STREAMS

13.  STREAMS Multiplex Drivers

Part III Advanced Topics

14.  Debugging STREAMS-based Applications

Kernel Debug Printing

STREAMS Error and Trace Logging

Kernel Examination Tools

crash Command

adb Command

kadb Command

Part IV Appendixes

A.  Message Types

B.  Kernel Utility Interface Summary

C.  STREAMS-Based Terminal Subsystem

D.  STREAMS FAQ

Glossary

Index

Kernel Debug Printing

The kernel routine cmn_err(9F) enables printing of formatted strings on a system console. It displays a specified message on the console and can also store it in the msgbuf that is a circular array in the kernel. The format of cmn_err(9F) is:

#include <sys/cmn_err.h>

void cmn_err (int level, char *fmt, int args)

where level can take the following values:

fmt and args are passed to the kernel routine printf that runs at splhi and should be used sparingly. If the first character of fmt is ! (an exclamation point), output is directed to msgbuf. msgbuf can be accessed with the crash command. If the destination character begins with ^ (a caret) output goes to the console. If no destination character is specified, the message is directed to both the msgbuf array and the console.

cmn_err(9F) appends each fmt with “\n”, except for the CE_CONT level, even when a message is sent to the msgbuf array. args specifies a set of arguments passed when the message is displayed. Valid specifications are %s (string), %u (unsigned decimal), %d (decimal), %o (octal), and %x (hexadecimal). cmn_err(9F) does not accept length specifications in conversion specifications. For example, %3d is ignored.


Note - crash has reached EOL; for information about how to transition from crash to mdb, see the Oracle Solaris Modular Debugger Guide.