Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


traceoptions (Extensions)


Hierarchy Level


Trace options for extension-service applications. You can set the traceoptions statement for the application level or for the file script-name level or for both. If the traceoptions statement is set for both the application and file script-name levels, the latter will have a higher priority.


Global traceoptions for daemonized applications do not take effect if the daemonized application and global traceoptions are committed separately



Indicate trace file information.


Name of the file to receive the tracing operation output. Enclose the name in quotation marks. Traceoption output files are located in the /var/log/ directory.

files number

(Optional) Specify maximum number of trace files.

  • Range: 2 through 1000

  • Default: 3

size size

(Optional) Specify the maximum size of each trace file. When a trace file named trace-file reaches its maximum size, it is renamed trace-file.0. The traceoption output continues in a second trace file named trace-file.1. When trace-file.1 reaches its maximum size, output continues in a third file named trace-file.2, and so on. When the maximum number of trace files is reached, the oldest trace file is overwritten.

  • Range: 10240 through 1073741824

  • Default: 128k

world-readable | no-world-readable

(Optional). Grant all users permission to read log files, or restrict the permission only to the root user and users who have Junos OS maintenance permission.

flag flag

Specify the tracing operation to perform. To specify more than one tracing operation, include multiple flag statements:


Trace all operations.


Trace important events.


Trace script input data.


Trace grpc server events.


Trace notification events.


Trace routing socket calls.


Trace timeouts.


Trace internal timer events.


Disable remote tracing. This option is valid only when [system tracing] is configured.

Required Privilege Level

trace—To view this statement in the configuration.

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

Release Information

Statement introduced in Junos OS Release 16.1.