Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

traceoptions (SNMP)

Syntax

Hierarchy Level

Description

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.

  • 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.

  • protocol-timeouts—Log SNMP response timeouts.

  • routing-socket—Log routing socket calls.

  • subagent—Log subagent restarts.

  • timer—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.