How to Log and Trace Events with Junos OS
The logging and tracing operations of Junos OS allow you to find out about events that occur in your device — normal operations, as well as error conditions. For fast resolution, use the following tools to trace and analyze the sequence of events leading to network or device issues:
System logging: Generates system log messages (syslog messages) for recording events that occur on the device, including hardware and processes in the operating system. Events include any change in the system, whether they are planned, expected, or indicate a problem. A few examples — among the thousands that could be named — are an interface start up, login failure, or hardware failure conditions.
Trace logging (tracing options): Provides a wide range of variables for observing network and system events of protocol operations. Examples include BGP state changes, graceful restart events, and even tracking SNMP operations and statistics. Trace logging is a valuable tool when you need to find out what’s going on in a device running Junos.
For the most efficient debugging, it’s good practice to set the appropriate traceoptions parameters in the configuration ahead of time and leave them disabled. Then, when you need them, they’re ready, and you can quickly start finding out what’s going on.