![](/images/new-backgrounds/1270397/270397373x1.webp)
Tracing and Logging Utilities
netfmt
0:00 00 00 01 61 61 61 61 61 61 61 61 61 61 61 61 ...aaaaaaaaaaaa
16:61 61 61 61
To format the file /tmp/tracex25.TRC0 in “Nice” mode (output is mainly packet headers) with no filtering:
/etc/netfmt
Tx board: | 0 | at Wed Sep 28 | 1994 10:16:19.689181 Data Packet lci 64 | ||||
: | 0 | : | 0 | ||||
P(R) | : | 0 | P(S) |
| : | 0 |
|
User | Data = | 20 bytes |
|
|
|
|
To format the file /tmp/tracex25.TRC0 in “terse” (short) mode, with no filtering:
/etc/netfmt
The output will be:
Tx board: 0 at 10:16:19.689181 Data Packet lci 64 PR: 0 PS: 0
Creating a Filter File
You can use a filter file to filter information according to various criteria. This enables you to apply
You create a filter file with your text editor by entering the filter configuration commands in predetermined fields on the same line. The filter commands are: type, “!” (not), and value.
The values specified in the filter file are compared against the input values. When there is a match, the information is recorded. It is possible to create specific filters for all configured subsystems.
Refer to the man pages for netfmt for a complete explanation of the format file syntax.
Filter File Syntax
Each line (filter) in the system level filter file begins with the keyword FORMATTER FILTER (for system level filters) or SX25L3 (for subsystem level filters, level 3 only). Entries are not
FORMATTER FILTER [type][!] [value]
Chapter 7 | 187 |