msglog - display the MINIX message logs


SYNOPSIS

msglog [-f src] [-o file-name] [n]
msglog [-f src] [-o file-name] command argument ...

DESCRIPTION

msglog is used to examine the MINIX message log. It has two modes of operation. In the first mode, it reads at most n (or 4096 when n is omitted) log records from the log device (/dev/msglog) and displays the number of messages, if non-zero, exchanged between pairs of processes. In addition the program displays the minimum and maximum log message number it processed and the number of missed log entries and its percentage with respect to the total number of logged messages.

In the second mode of operation the same information is logged and displayed but for the duration of the execution of command. Care has been taken to minimize the pollution of the log by the msglog program. Before starting command the log is cleared. The log is read at regular intervals rather than being polled continuously.

The output generated by msglog consists of a first line (given as a printf(3) format string): ``min %ld, max %ld, missed %ld (%d%%)'', followed by one or more lines of the following format: ``src -> dst: %ld'' where src and dst are displayed as either an integer or as a string when its name is known, followed by the message count. This message count is always larger than zero. The following names are known: tty, dp8390, scsi, winchester, syn_alarm, idle, printer, floppy, memory, clock, sys, hardware, mm, fs, inet. The lines are sorted on task number.

OPTIONS

-f src
The``-f'' flag displays the number of messages, if any, sent per clock tick for a given source src. The source is specified by its task number. The implicit or explicit message count given in the first form, refers to the message count before this selection. The output generated by using the ``-f'' flag has the following format: ``%ld: %ld'', a timestamp followed by the number of messages sent during that tick.
-o file-name
The ``-o'' option specifies the file to be used for the log output. By default, the output goes to standard output.

EXAMPLES

The first example reads the message log while the ls -l /dev/null command is executed. The output of the msglog command is put in the file /tmp/o.
$ msglog -o /tmp/o ls -l /dev/null
crw-rw-rw-  1 root     kmem       1,   3 Jan 20 18:04 /dev/null
$ cat /tmp/o
min 15443458, max 15443903, missed 0 (0%)
tty -> fs: 5
dp8390 -> inet: 1
syn_alarm -> inet: 1
memory -> fs: 2
clock -> syn_alarm: 1
clock -> mm: 2
clock -> fs: 5
clock -> inet: 3
sys -> mm: 116
sys -> fs: 30
sys -> inet: 1
mm -> clock: 2
mm -> sys: 116
mm -> fs: 17
mm -> 17: 4
mm -> 18: 13
fs -> tty: 4
fs -> memory: 2
fs -> clock: 5
fs -> sys: 30
fs -> mm: 17
fs -> inet: 1
fs -> 16: 2
fs -> 17: 4
fs -> 18: 16
inet -> dp8390: 1
inet -> clock: 3
inet -> sys: 1
inet -> fs: 1
16 -> fs: 2
17 -> mm: 4
17 -> fs: 4
18 -> mm: 14
18 -> fs: 16
The second example tries to read 4096 message from the message log after the ls -l > /dev/null command. Of these 4096 message, the number of message from task -3 are shown, grouped per clock tick.
$ ls -l > /dev/null; msglog -f -3
4565906: 1
4565907: 2
4565908: 2
4566001: 2
4566002: 5
4566004: 2
4566100: 4
...

EXIT CODE

The following exit values are returned:
0
Successful completion.
>0
An error occurred.

BUGS

The output is more suitable for visualization tools than for human consumption.

Commands consisting of digits only should be specified with their directory expilicitly stated to distinguish them from the amount of messages read, i.e. ``./33'' instead of ``33''.

SEE ALSO

msglog(4)