Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ trmon(1) — bsd — Apollo Domain/OS SR10.3.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

trconf(1)

tracem(4)

strinfo(1)

TRMON(1)                        Domain/OS BSD                         TRMON(1)




NAME
     trmon - print messages collected by trace modules on active Streams

SYNOPSIS
     trmon [-h] [-n name] [-f format_file ]

DESCRIPTION
     trmon prints STREAMS messages collected by instances of tracem modules
     pushed onto Streams with trconf.  For each reported message, a header
     containing reporting instance id, sequence id, message type, timing
     information, and message direction is printed.  The header is followed
     (if -f is used) by the contents of the data part of the message.

OPTIONS
     -h             Suppress printing of header output.

     -n name        Give this trmon instance a name.  name is an alpha-numeric
                    string.  If no name is given, the trmon instance will have
                    the name trmonn, where n is its internal id.

     -f format_file Use format_file to specify the format to print the data
                    part of the reported messages.  This file is in ``modified
                    C struct syntax.'' Customized output formats for any type
                    of message can be formed by taking structure definitions
                    from the header file of a protocol and making some minor
                    modifications.  The format file consists of a number of
                    lines for each data field to be recognized as follows:

                    string type [fieldname] [comment]

                    where:

                    string         is a string delimited by double-quotes ("")
                                   and containing a printf format string, or a
                                   null string ("") meaning don't print this
                                   field.

                    type           is a C basic type, or dump, which produces
                                   a hexadecimal dump of the rest of the
                                   message (like od(1) -h), or raw, which
                                   outputs the raw bytes.

                    fieldname      is a C field identifier and is optional and
                                   ignored.

                    comment        is a C comment and is optional and ignored.

EXAMPLES
     The following example causes trmon to choose its own name, and dump all
     messages it receives from all tracem instances.

     trmon -f dumpfile


     where dump_file is a file which contains:

     " "  dump a;   /* to dump the entire message */



     The following example will cause trmon to name itself traceioctl and to
     format all messages it receives without header information.  In this
     case, it is assumed that trconf will be used to configure a tracem
     instance that reports only on M_IOCTL messages, and to associate that
     tracing instance with this trmon instance.

     trmon -h -n traceioctl -f iocfile


     where iocfile is a file which contains:

     "cmd: %d,"  int         ioc_cmd; /* ioctl command */
     " uid: %u," unsigned short       ioc_uid;/* effective uid */
     " gid: %u," unsigned short       ioc_gid;/* effective gid */
     " id: %u,"  unsigned int         ioc_id;/* ioctl id */
     " count: %u,"           unsigned intioc_count;/* # bytes of data */
     " error: %d,"           int      ioc_error;/* error code */
     " rval: %d\n"           int      ioc_rval;/* return value  */
     " "         dump        a;       /* dump data */


SEE ALSO
     trconf(1), tracem(4), strinfo(1)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026