msglog - message log device


SYNOPSIS

/dev/msglog

DESCRIPTION

msglog is a device driver that provides an interface to the MINIX message logging facility. The device driver provides access to the last at most 4096 log records of messages sent by the MINIX system. The device driver provides these log records in FIFO order. That is, the oldest log record in the message log is read first.

The read system call returns the number of log records (in bytes) that fit in the user supplied buffer, or at most the number of messages available in the log. Reading from the device resets the log by the number of log records read.

For each message sent a log record is kept, containing a timestamp (in clock ticks), its source and destination. These are available in the following structure:

struct logent {
        clock_t  timestamp;     /* time stamp */
        unsigned entno;         /* log entry number */
        int      src, dst;      /* source and destination */
};

This structure contains the time the message was sent in clock ticks elapsed since boot time, its log entry number (numbered from the start of the system), its source and destination. Reads from the msglog device should be aligned by ``struct logent''.

BUGS

Creating an appropriate include file containing ``struct logent'' is left as an exercise for the reader.

SEE ALSO

msglog(1), read(2)