Tracing and logging operations allow you to track events that occur in the router—both normal router operations and error conditions—and to track the packets that are generated by or passed through the router. The results of tracing and logging operations are placed in files in the /var/log directory on the router.
The JUNOS software provides an option to do remote tracing for specific processes, which greatly reduces use of the router’s internal storage for tracing and is analogous to remote system logging. You configure remote tracing system-wide using the tracing statement under the [edit system] hierarchy. By default, remote tracing is not configured. You can disable remote tracing for specific processes using the no-remote-trace statement at the [edit <process-name> traceoptions] hierarchy. This feature does not alter local tracing functionality in any way; whereby logging files are stored on the router.
The JUNOS software supports remote tracing for the following processes:
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 router. You configure these operations by using the syslog statement at the [edit system] hierarchy level, as described in Configuring System Log Messages, and by using the options statement at the [edit routing-options] hierarchy level, as described in the JUNOS Routing Protocols Configuration Guide.
Tracing operations record more detailed messages about the operation of routing protocols, such as the various types of routing protocol packets sent and received, and routing policy actions. You configure tracing operations using the traceoptions statement. You can define tracing operations in different portions of the router configuration:
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 /etc/syslog.conf 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 /etc/syslog.conf. If your syslog server supports
parsing hostname and program-name, then you can separate traces from
the various processes. For more information, issue the man syslog.conf command on the remote host.