Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
 

Related Documentation

 

Understanding 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 files in the /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 by using the tracing statement at the [edit system] hierarchy level.

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

If you enabled remote tracing but wish to disable it for specific processes on the switch, use the no-remote-trace statement at the [edit process-name traceoptions] hierarchy level. This feature does not alter local tracing functionality in any way, and logging files are stored on the switch.

Logging operations use a 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. To configure tracing operations, use 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 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 of the configuration.
  • Protocol-specific tracing operations—Define tracing for a specific routing protocol. You configure protocol-specific tracing operations in the [edit protocols] hierarchy when configuring the individual routing protocol. Protocol-specific tracing operations override any equivalent operations that you specify in the global traceoptions statement. If there are no equivalent operations, they supplement the global tracing options. If you do not specify any protocol-specific tracing, the routing protocol inherits all the global tracing operations.
  • 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 or, if there are no equivalents, supplement them. 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 of the configuration.
  • 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 your 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.

 

Related Documentation

 

Published: 2014-07-23

Supported Platforms

 

Related Documentation

 

Published: 2014-07-23