[an error occurred while processing this directive][an error occurred while processing this directive]

Tracing Diameter Base Protocol Processes

The JUNOS Software trace operations feature tracks Diameter base protocol operations and records events in a log file. By default, the tracing operation is inactive. To trace Diameter base protocol processes, you specify flags in the traceoptions statement at the [edit system processes diameter-service] hierarchy level.

The default tracing behavior is the following:

  1. Important events are logged in a file called jdiameterd located in the /var/log directory. You cannot change the directory (/var/log) in which trace files are located.
  2. When the file jdiameterd reaches 128 kilobytes (KB), it is renamed jdiameterd.0, then jdiameterd.1, and so on, until there are three trace files. Then the oldest trace file (jdiameterd2. is overwritten. For more information about how log files are created, see the JUNOS System Log Messages Reference.

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

To configure Diameter base protocol tracing operations:

  1. Specify that you want to configure tracing options.
    [edit system processes diameter-service]user@host# edit traceoptions
  2. (Optional) Configure the name for the file used for the trace output.

    See Configuring the Diameter Base Protocol Trace Log Filename.

  3. (Optional) Configure the number and size of the log files.

    See Configuring the Number and Size of Diameter Base Protocol Log Files.

  4. (Optional) Configure access to the log file.

    See Configuring Access to the Diameter Base Protocol Log File.

  5. (Optional) Configure a regular expression to filter logging events.

    See Configuring a Regular Expression for Diameter Base Protocol Lines to Be Logged.

  6. (Optional) Configure flags to filter the operations to be logged.

    See Configuring the Diameter Base Protocol Tracing Flags.

The tracing options are described in the following sections:

Configuring the Diameter Base Protocol Trace Log Filename

By default, the name of the file that records trace output for Diameter base protocol is jdiameterd. You can specify a different name by including the file statement at the [edit system processes diameter-service] hierarchy level:

To configure the filename for Diameter base protocol tracing operations:

  • Specify the name of the file used for the trace output.
    [edit system processes diameter-service traceoptions]user@host# set file diam_logfile_1

Configuring the Number and Size of Diameter Base Protocol Log Files

By default, when the trace file reaches 128 kilobytes (KB) in size, it is renamed filename.0, then filename.1, and so on, until there are three trace files. Then the oldest trace file (filename.2) 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 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 renamed filename.0, and a new file called filename is created. When the new filename reaches 2 MB, filename.0 is renamed filename.1 and filename is renamed filename.0. This process repeats until there are 20 trace files. Then the oldest file (filename.19) is overwritten by the newest file (filename.0).

To configure the number and size of trace files:

  • Specify the name, number, and size of the file used for the trace output. (Diameter base protocol supports the files and size options for the traceoptions statement.)
    [edit system processes diameter-service traceoptions]user@host# set file diam_1 _logfile_1 files 20 size 2097152

Configuring Access to the Diameter Base Protocol 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.
    [edit system processes diameter-service traceoptions]user@host# set file diam_1 _logfile_1 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.
    [edit system processes diameter-service traceoptions]user@host# set file diam_1 _logfile_1 no-world-readable

Configuring a Regular Expression for Diameter Base Protocol Lines to Be Logged

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

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

To configure regular expressions to be matched:

  • Configure the regular expression.
    [edit system processes diameter-service traceoptions]user@host# set file diam_1 _logfile_1 match regex

Configuring the Diameter Base Protocol Tracing Flags

By default, only important events are logged. You can specify which trace operations are logged by including specific tracing flags. The following table describes the flags that you can include.

Flag

Description

all

Trace all events

application

Trace Diameter application interface events

configuration

Trace configuration events

daemon

Trace daemon level events

diameter-instance

Trace Diameter instance events

dne

Trace Diameter DNE events

framework

Trace Diameter framework

memory-management

Trace memory management events

messages

Trace Diameter messages

node

Trace Diameter node events

peer

Trace Diameter peer events

To configure the flags for the events to be logged:

  • Configure the flags.
    [edit system processes diameter-service traceoptions]user@host# set flag dne

Published: 2010-04-15

[an error occurred while processing this directive]