Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Tracing and Logging Operations

Tracing and logging operations enable you to track events that occur in the switch—both normal operations and error conditions—and to track the packets that are generated by or passed through the switch. The results of tracing and logging operations are placed in /var/log directory on the switch.

The Junos OS supports remote tracing for the following processes:

  • chassisd—Chassis-control process

  • eventd—Event-processing process

  • cosd—Class-of-service process

You configure remote tracing using the tracing statement at the [edit system] hierarchy level.

Note:

The tracing statement is not supported on the QFX3000 QFabric system.

You can disable remote tracing for specific processes on the switch using the no-remote-trace statement at the [edit process-name traceoptions] hierarchy level.

Logging operations use system logging mechanism similar to the UNIX syslogd utility to record systemwide, high-level operations, such as interfaces going up or down and users logging in to or out of the switch. You configure these operations by using the syslog statement at the [edit system] hierarchy level and by using the options statement at the [edit ethernet-switching-options] hierarchy level.

Tracing operations record more detailed information about the operations of the switch, including packet forwarding and routing information. You can configure tracing operations using the traceoptions statement.

Note:

The traceoptions statement is not supported on the QFX3000 QFabric system.

You can define tracing operations in different portions of the switch configuration:

  • SNMP agent activity tracing operations—Define tracing of the activities of SNMP agents on the switch. You can configure SNMP agent activity tracing operations at the [edit snmp] hierarchy level.

  • Global switching tracing operations—Define tracing for all switching operations. You configure global switching tracing operations at the [edit ethernet-switching-options] hierarchy level.

  • Protocol-specific tracing operations—Define tracing for a specific routing protocol. You configure protocol-specific tracing operations in the [edit protocols] hierarchy. Protocol-specific tracing operations override any equivalent operations that you specify in the global traceoptions statement.

  • Tracing operations within individual routing protocol entities—Some protocols allow you to define more granular tracing operations. For example, in Border Gateway Protocol (BGP), you can configure peer-specific tracing operations. These operations override any equivalent BGP-wide operations. If you do not specify any peer-specific tracing operations, the peers inherit, first, all the BGP-wide tracing operations and, second, the global tracing operations.

  • Interface tracing operations—Define tracing for individual interfaces and for the interface process itself. You define interface tracing operations at the [edit interfaces] hierarchy level.

  • Remote tracing—To enable system-wide remote tracing, configure the destination-override syslog host statement at the [edit system tracing] hierarchy level. This specifies the remote host running the system log process (syslogd), which collects the traces. Traces are written to files on the remote host in accordance with the syslogd configuration in /etc/syslog.conf. By default, remote tracing is not configured.

    To override the system-wide remote tracing configuration for a particular process, include the no-remote-trace statement at the [edit process-name traceoptions] hierarchy. When no-remote-trace is enabled, the process does local tracing.

    To collect traces, use the local0 facility as the selector in the /etc/syslog.conf file on the remote host. To separate traces from various processes into different files, include the process name or trace-file name (if it is specified at the [edit process-name traceoptions file] hierarchy level) in the Program field in the /etc/syslog.conf file. If the system log server supports parsing hostname and program name, then you can separate traces from the various processes.

Note:

During a commit check, warnings about the traceoptions configuration (for example, mismatch in trace file sizes or number of trace files) are not displayed on the console. However, these warnings are logged in the system log messages when the new configuration is committed.