Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Tracing Subscriber Management Session Database Replication Events for Troubleshooting

The Junos OS trace feature tracks subscriber management session database replication operations and records events in a log file. The error descriptions captured in the log file provide detailed information to help you solve problems. The operations and events are those associated with the bdbrepd process, which syncs the subscriber management database between the primary and backup Routing Engines.

By default, nothing is traced. When you enable the tracing operation, the default tracing behavior is as follows:

  1. Important events are logged in a file located in the /var/log directory. By default, the router uses the filename bdbrepd. You can specify a different filename, but you cannot change the directory in which trace files are located.

  2. When the trace log file filename reaches 128 kilobytes (KB), it is compressed and renamed filename.0.gz. Subsequent events are logged in a new file called filename, until it reaches capacity again. At this point, filename.0.gz is renamed filename.1.gz and filename is compressed and renamed filename.0.gz. This process repeats until the number of archived files reaches the maximum file number. Then the oldest trace file—the one with the highest number—is overwritten.

    You can optionally configure the maximum file size to be from 10 KB through 1 gigabyte (GB). You can also specify the number of trace files to be from 2 through 1000. (For more information about how log files are created, see the System Log Explorer.)

By default, only the user who configures the tracing operation can access log files. You can optionally configure read-only access for all users.

The following topics describe how to configure all aspects of tracing subscriber management session database operations:

Configuring the Subscriber Management Session Database Replication Trace Log Filename

By default, the name of the file that records trace output for the subscriber management session database is bdbrepd. You can specify a different name with the file option.

To configure the filename for subscriber management database tracing operations:

  • Specify the name of the file used for the trace output.

Configuring the Number and Size of Subscriber Management Session Database Replication Log Files

You can optionally specify the number of compressed, archived trace log files to be from 2 through 1000. You can also configure the maximum file size to be from 10 KB through 1 gigabyte (GB); the default size is 128 kilobytes (KB).

The archived files are differentiated by a suffix in the format .number.gz. The newest archived file is .0.gz and the oldest archived file is .(maximum number)-1.gz. When the current trace log file reaches the maximum size, it is compressed and renamed, and any existing archived files are renamed. This process repeats until the maximum number of archived files is reached, at which point the oldest file is overwritten.

For example, you can set the maximum file size to 2 MB, and the maximum number of files to 20. When the file that receives the output of the tracing operation, filename, reaches 2 MB, filename is compressed and renamed filename.0.gz, and a new file called filename is created. When the new filename reaches 2 MB, filename.0.gz is renamed filename.1.gz and filename is compressed and renamed filename.0.gz. This process repeats until there are 20 trace files. Then the oldest file, filename.19.gz, is simply overwritten when the next oldest file, filename.18.gz is compressed and renamed to filename.19.gz.

To configure the number and size of trace files:

  • Specify the name, number, and size of the file used for the trace output.

Configuring Access to the Subscriber Management Session Database Replication Log File

By default, only the user who configures the tracing operation can access the log files. You can enable all users to read the log file and you can explicitly set the default behavior of the log file.

To specify that all users can read the log file:

  • Configure the log file to be world-readable.

To explicitly set the default behavior, only the user who configured tracing can read the log file:

  • Configure the log file to be no-world-readable.

Configuring a Regular Expression for Subscriber Management Session Database Replication Messages to Be Logged

By default, the trace operation output includes all messages relevant to the logged events.

You can refine the output by including regular expressions to be matched.

To configure regular expressions to be matched:

  • Configure the regular expression.

Configuring the Subscriber Management Session Database Replication Tracing Flags

By default, only important events are logged. You can specify which events and operations are logged by specifying one or more tracing flags.

To configure the flags for the events to be logged:

  • Configure the flags.