- traceoptions {
- file filename <files number> <size size> <world-readable
| no-world-readable><match regex>;
- flag flag;
- }
- [edit snmp]
Statement introduced before JUNOS Release 7.4.
file filename option added in JUNOS Release 8.1.
world-readable | no-world-readable option added in JUNOS Release 8.1.
match regex option added in JUNOS Release 8.1.
The output of the tracing operations is placed into log files in the /var/log directory. Each log file is named after the SNMP agent that generates it. Currently, the following logs are created in the /var/log directory when the traceoptions statement is used:
file filename—By default, the name of the log file that records trace output is the name of the process being traced (for example, mib2d or snmpd). Use this option to specify another name.
world-readable | no-world-readable—(Optional) By default, log files can be accessed only by the user who configures the tracing operation. The world-readable option enables any user to read the file. To explicitly set the default behavior, use the no-world-readable option.
files number—(Optional) Maximum number of trace files per SNMP subagent. When a trace file (for example, snmpd) reaches its maximum size, it is archived by being renamed to snmpd.0. The previous snmpd.1 is renamed to snmpd.2, and so on. The oldest archived file is deleted.
flag flag—Tracing operation to perform. To specify more than one tracing operation, include multiple flag statements:
match regex—(Optional) Refine the output to include lines that contain the regular expression.
size size—(Optional) Maximum size, in kilobytes (KB), of each trace file before it is closed and archived.
See Tracing SNMP Activity on a JUNOS Device.
snmp—To view this statement in the configuration.
snmp-control—To add this statement to the configuration.