Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

traceoptions (Individual Interfaces)

Syntax (Individual interfaces with PTX Series, EX Series, ACX Series)

Syntax (Individual interfaces with QFX Series, OCX1100, EX4600, NFX Series)

Syntax (OAMLFM with EX Series, QFX Series, NFX Series)

Syntax (Interface process with ACX Series, SRX Series, MX Series, M Series, T Series)

Hierarchy Level (Individual interfaces with PTX Series, EX Series, ACX Series, QFX Series, OCX1100, EX4600, NFX Series)

Hierarchy Level (Interface process with ACX Series, SRX Series, MX Series, M Series, T Series)

Description

Define tracing operations for individual interfaces.

To specify more than one tracing operation, include multiple flag statements.

The interfaces traceoptions statement does not support a trace file. The logging is done by the kernel, so the tracing information is placed in the system syslog file in the directory /var/log/dcd .

On EX Series, QFX Series, and NFX Series platforms, configure tracing options the link fault management.

On ACX Series, SRX Series, MX Series, M Series, and T Series platforms define tracing operations for the interface process (dcd).

Default

If you do not include this statement, no interface-specific tracing operations are performed.

Options

Table 1 lists options for traceoption command for the following platforms:

Table 1: Options for traceoptions

Option

Individual interfaces with PTX Series, ACX Series, EX Series Individual interfaces with QFX Series, QFabric System, OCX1100, EX4600, NFX Series Interface Process with OAMLFM with EX Series, QFX Series, NFX Series Interface process with ACX Series, SRX Series, MX Series, M Series, T Series

file filename

—Name of the file to receive the output of the tracing operation. Enclose the name within quotation marks. All files are placed in the directory /var/log/dcd . By default, interface process tracing output is placed in the file.

 

—Name of the file to receive the output of the tracing operation. Enclose the name within quotation marks. All files are placed in the directory /var/log/dcd .

—Name of the file to receive the output of the tracing operation. Enclose the name within quotation marks. All files are placed in the directory/var/log/dcd . By default, interface process tracing output is placed in the file dcd.

files number

—(Optional) Maximum number of trace files. When a trace file named trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and so on, until the maximum number of trace files is reached. Then the oldest trace file is overwritten.

 

—(Optional) Maximum number of trace files. When a trace file named trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and so on, until the maximum xk to specify KB, xm to specify MB, or xg to specify GB number of trace files is reached. Then the oldest trace file is overwritten. If you specify a maximum number of files, you also must specify a maximum file size with the size option.

—(Optional) Maximum number of trace files. When a trace file named trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and so on, until the maximum number of trace files is reached. Then the oldest trace file is overwritten.

If you specify a maximum number of files, you also must specify a maximum file size with the size option.

Range: 2 through 1000

Default: 3 files

flag

—Tracing operation to perform. To specify more than one tracing operation, include multiple flag statements. The following are the interface-specific tracing options.

  • all—All interface tracing operations

  • event—Interface events

  • ipc—Interface interprocess communication (IPC) messages

  • media—Interface media changes

  • q921—Trace ISDN Q.921 frames

  • q931—Trace ISDN Q.931 frames

—Tracing operation to perform. To specify more than one tracing operation, include multiple flag statements. The following are the interface-specific tracing options.

  • all—All interface tracing operations

  • event—Interface events

  • ipc—Interface interprocess communication (IPC) messages

  • media—Interface media changes

  • q921—Trace ISDN Q.921 frames

  • q931—Trace ISDN Q.931 frames

—Tracing operation to perform. To specify more than one tracing operation, include multiple flag statements. You can include the following flags:

  • action-profile—Trace action profile invocation events.

  • all—Trace all events.

  • configuration—Trace configuration events.

  • protocol—Trace protocol processing events.

  • routing socket—Trace routing socket events.

—Tracing operation to perform. To specify more than one tracing operation, include multiple flag statements. You can include the following flags:

  • all

  • change-events—Log changes that produce configuration events

  • config-states—Log the configuration state machine changes

  • kernel—Log configuration IPC messages to kernel

  • kernel-detail—Log details of configuration messages to kernel

match

—(Optional) Regular expression for lines to be traced.

 

—(Optional) Refine the output to log only those lines that match the given regular expression.

 

size size

—(Optional) Maximum size of each trace file, in kilobytes (KB), megabytes (MB), or gigabytes (GB). When a trace file named trace-file reaches this size, it is renamed trace-file.0. When the trace-file again reaches its maximum size, trace-file.0 is renamed trace-file.1 and trace-file is renamed trace-file.0. This renaming scheme continues until the maximum number of trace files is reached. Then, the oldest trace file is overwritten.

 

—(Optional) Maximum size of each trace file, in kilobytes (KB), megabytes (MB), or gigabytes (GB). When a trace file named trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and so on, until the maximum number of trace files is reached. Then the oldest trace file is overwritten. If you specify a maximum number of files, you also must specify a maximum file size with the files option.

Syntax: xk to specify KB, xm to specify MB, or xg to specify GB

Range: 10 KB through 1 GB

Default: 128 KB

Default: If you do not include this option, tracing output is appended to an existing trace file.

—(Optional) Maximum size of each trace file, in kilobytes (KB), megabytes (MB), or gigabytes (GB). When a trace file named trace-file reaches this size, it is renamed trace-file.0. When the trace-file again reaches its maximum size, trace-file.0 is renamed trace-file.1 and trace-file is renamed trace-file.0. This renaming scheme continues until the maximum number of trace files is reached. Then, the oldest trace file is overwritten. If you specify a maximum file size, you also must specify a maximum number of trace files with the files option.

Syntax: xk to specify kilobytes, xm to specify megabytes, or xg to specify gigabytes

Range: 10 KB through the maximum file size supported on your router

Default: 1 MB

no-world-readable

—(Optional) Prevent any user from reading the log file.

 

—(Optional) Restrict file access to the user who created the file.

—(Optional) Disallow any user to read the log file.

world-readable

—(Optional) Allow any user to read the log file.

 

—(Optional) Enable unrestricted file access.

—(Optional) Allow any user to read the log file.

disable

     

—(Optional) Disable the tracing operation. You can use this option to disable a single operation when you have defined a broad group of tracing operations, such as all.

no-remote-trace

   

—(Optional) Disable the remote trace.

-

match regex

     

—(Optional) Refine the output to include only those lines that match the given regular expression.

Required Privilege Level

interface—To view this statement in the configuration.

interface-control—To add this statement to the configuration.

routing—To view this statement in the configuration.routing-control—To add this statement to the configuration.

Release Information

Statement introduced before Junos OS Release 7.4.

Statement introduced in Junos OS Release 12.2 for ACX Series Universal Metro Routers.