published: 20th of February 2019
Trace options are similar to running a debug in other vendors.
When tracing is enabled the results are stored in a trace file in the /var/log/ directory or sent to a remote syslog server.
Remote logging is configured under the system > tracing configuration hierarchy.
The architecture of Junos allow for the enabling of trace options in production without severely impacting a devices operational stability.
Tracing can be enabled at various levels of the configuration hierarchy such as the protocols and interfaces levels.
protocols {
ospf {
traceoptions {
file FILE-NAME [OPTIONS].. ;
flag FLAG-TYPE ;
flag FLAG-TYPE detail ;
}
}
}
There are a number of option available when enabling tracing as outline below.
The show log <FILENAME> command is used to view a tracefile.
The monitor start <FILENAME> command starts real-time monitoring of the file.
The monitor stop <FILENAME> command stops real-time monitoring of the file.
The ESC + q key combination starts/stops syslog output to the screen.
The clear log <FILENAME> command is used to delete the contents of a trace file.
The file delete <FILENAME> command is used to delete a trace file.