Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


traceoptions (Extensions)



Hierarchy Level

Release Information

Statement introduced in Junos OS Release 16.1.


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


fileIndicate trace file information.
filenameName 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 flagSpecify the tracing operation to perform. To specify more than one tracing operation, include multiple flag statements:
allTrace all operations.
configTrace important events.
generalTrace script input data.
grpcTrace grpc server events.
notificationTrace notification events.
routing-socketTrace routing socket calls.
timeoutsTrace timeouts.
timerTrace internal timer events.
no-remote-traceDisable 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.

Related Documentation