traceoptions (SNMP)
Syntax
traceoptions {
file filename <files number> <match regular-expression> <size size> <world-readable | no-world-readable>;
flag flag;
no-remote-trace;
}
Hierarchy Level
[edit snmp]
Description
Enabling tracing can adversely impact scale and performance and may increase security risk. We strongly recommend using the trace, tracing, or traceoptions commands only under the guidance of a JTAC support engineer. After collecting the debug information, immediately disable tracing to minimize risk and restore normal system performance.
Track the activities of SNMP agents on the switch and record the information in log files.
The traceoptions statement is not supported on the QFabric
system.
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:
chassisd
craftd
ilmid
mib2d
rmopd
serviced
snmpd
Options
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.
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.
Range: 2 through 1000 files
Default: 10 files
flag flag—Tracing
operation to perform. To specify more than one tracing operation,
include multiple flag statements:
all—Log all SNMP events.
-
configuration—Log reading of configuration at the[edit snmp]hierarchy level.
-
database—Log events involving storage and retrieval in the events database.
-
events—Log important events.
general—Log general events.
interface-stats—Log physical and logical interface statistics.
nonvolatile-sets—Log nonvolatile SNMP set request handling.
pdu—Log SNMP request and response packets.
-
policy—Log policy processing.
protocol-timeouts—Log SNMP response timeouts.
routing-socket—Log routing socket calls.
-
server—Log communication with processes that are generating events.
subagent—Log subagent restarts.
timer-events—Log internally generated events.
varbind-error—Log variable binding errors.
match regular-expression—(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.
Range: 10 KB through 1 GB
Default: 1000 KB
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.
Required Privilege Level
snmp—To view this statement in the configuration.
snmp-control—To add this statement to the configuration.
Release Information
Statement introduced before Junos OS Release 7.4.
file filename option added in
Junos OS Release 8.1.
world-readable | no-world-readable option added in
Junos OS Release 8.1.
match regular-expression option
added in Junos OS Release 8.1.