klog(7)
klog - kernel error logging interface
As shipped in IRIX 6.5.5. Unchanged since IRIX 6.5.
NAME klog - kernel error logging interface DESCRIPTION Minor device 0 of the klog driver is the interface between a process and the kernel's error logging mechanism. When this device is open, messages printed by the kernel, which normally appear only in the system console window, also are buffered by the klog driver. The data obtained by reading from this driver are the text of the kernel messages. The driver may be opened only for reading by a single process. Each read causes the requested number of bytes to be retrieved; the request is truncated if the read request is for more than the data currently available. Normally, this device is opened and read by syslogd(1M), the system logging daemon. This special device supports the following open(2) flags: O_NDELAY When set a read will not block if no data is present. If not set, a read will block until information becomes available. Each ioctl(2) call that this special device supports has the form: ioctl(fd, cmd, arg) where the format and meaning of arg vary with the specified cmd as described below: FIONREAD Returns the number of bytes currently available to read to the area pointed to by arg, where arg is treated as a pointer to a variable of type size_t. FIONBIO Enables or disables non-blocking mode, according to the boolean value supplied as arg. Enabling this mode has the same affect as the O_NDELAY flag for open(2). FIOASYNC Enables or disables asynchronous mode, according to the boolean value supplied as arg. When asynchronous mode is enabled, the process group associated with the open of the special device receives a SIGIO signal when data is available to be read. TIOCSPGRP Set the process group for use with asynchronous I/O (FIOASYNC). For this command, arg should contain the process group id. TIOCGPGRP Returns the current process group to the area pointed to by arg, where arg is treated as a pointer to a variable of type int. FILES /dev/klog special file SEE ALSO open(2), ioctl(2), syslogd(1M)