HP-UX Reference (11i v2 04/09) - 1M System Administration Commands N-Z (vol 4)
n
nettl(1M) nettl(1M)
error Invalid events or condition.
logging Special kind of trace that contains a log message.
loopback Packets whose source and destination system is the same.
For multiple kinds, the masks can be specified separately or combined into a single
number. For example, to enable both
pduin and pduout (to trace all packets coming
into and out of the node) use either
pduin pduout or 0x10000000 0x20000000
or the combination 0x30000000.
Not all subsystems support all trace kinds. No error is returned if a given subsystem
does not support a particular trace kind.
If a
-traceon is issued on a subsystem that is already being traced, the tracing mask
and optional values are changed to those specified by the new command, but the new
-file, -size, and -tracemax
options are ignored and a message is issued.
If
-entity all is specified, all recognized subsystems are traced except X.25-specific
subsystems. To turn on tracing for X.25, use the command
nettl -traceon kind -e x.25_subsys -card dev_name
where the value of x.25_subsys is SX25L2
or SX25L3.
Trace Memory Management
Memory used for tracing is made up of a circular linked list of trace buffers, each of which holds the trace
messages until they are written to the file. Trace messages are written to a buffer until it is filled, after
which the buffer is written to the file as a whole. While the buffer is being written to the file, the next
buffer in the list is used to hold the incoming trace messages. If no buffer is free to hold the incoming
trace messages, the messages will be dropped. Under this condition, additional trace buffers can be allo-
cated if the max_mem value is specified for
-mem option.
To achieve best tracing performance, the tracing algorithm imposes the following constraints:
a) Since a buffer is written to the file as a whole, the individual file size should be at least the buffer
size.
b) The additional amount of memory that can be allocated under heavy traffic given by (max_mem -
init_mem ) should be at least the buffer size.
where: buffer size =
MIN( init_mem /4, 32MB )
Refer to examples 10 and 11 for further details.
Data File Management
Data files created by the tracing and logging facility require special handling by the facility that you must
be aware of. When files are created, they have the suffix
.LOG000 or .TRC000
appended to them,
depending on whether they are log or trace files, respectively. This scheme is used to keep the files dis-
tinct for cases where you specify the same name in both places. Also, the files implement a type of circu-
lar buffer, with new data always going into the file appended with
.LOG000 or .TRC000. When a
logname.LOG000 or tracename .TRC000 file is full, each log or trace is renamed to the next higher
number in its sequence; that is, a file with sequence number N is renamed as a file with sequence number
N+1 and a new file named logname.LOG000 or tracename .TRC000 is created. The number of files that
can exist simultaneously on the system can be specified by the -n option.
Note : The file name prefix (logname or tracename ) specified by the user must not exceed eight char-
acters so that the file name plus suffix does not exceed fourteen characters. Longer names are trun-
cated. To see the actual name of the trace or log file, use the
nettl -status all command.
Console Logging
Console logging is used to display significant log events on the system console. The values in the
/etc/nettlgen.conf file determine if console logging is to be started and the entries in the
/var/adm/conslog.opts file determine what log messages will be reported to the console. The
nettlconf command can be used to configure and maintain the information in the
/etc/nettlgen.conf file (see nettlconf (1M)). If changes are made to these files, nettl must be
stopped and restarted for the new information to take effect.
All log messages written to the console as a result of this configuration information are in a special short
form. If more information is desired on the console, the
netfmt formatter can be used to direct output to
HP-UX 11i Version 2: September 2004 − 6 − Hewlett-Packard Company Section 1M−−527