traceoptions (NETCONF and Junos XML Protocol)
Syntax
traceoptions { file <filename> <files number> <match regular-expression> <size size> <world-readable | no-world-readable>; flag flag; no-remote-trace; on-demand; }
Hierarchy Level
[edit system services netconf]
Description
Define tracing operations for NETCONF and Junos XML protocol sessions.
Starting in Junos OS Release 16.1, when you enable tracing operations
at the [edit system services netconf traceoptions]
hierarchy,
Junos OS enables tracing operations for both NETCONF and Junos XML
protocol sessions and adds the [NETCONF]
and [JUNOScript]
tags to the log
file entries to distinguish the type of session. Prior to Junos OS
Release 16.1, only NETCONF session data was logged, and the [NETCONF]
tag was omitted.
Default
If you do not include this statement, NETCONF and Junos XML protocol-specific tracing operations are not performed.
Options
file filename |
Name of the file in which to write trace information. All files are placed in the /var/log directory.
|
files number |
(Optional) Maximum number of trace files. When a trace file named trace-file reaches its maximum size, it is renamed and compressed to trace-file.0.gz. When trace-file again reaches its maximum size, trace-file.0.gz is renamed trace-file.1.gz, and trace-file is renamed and compressed to trace-file.0.gz. 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 number of files, you also
must specify a maximum file size with the
|
flag flag |
Tracing operation to perform. To specify more than
one tracing operation, include multiple
|
match regular-expression |
(Optional) Refine the output to include only those lines that match the regular expression. |
no-remote-trace |
(Optional) Disable remote tracing. |
no-world-readable |
(Optional) Disable unrestricted file access, which restricts file access to the owner. This is the default. |
on-demand |
(Optional) Enable on-demand tracing, which requires that you start
and stop tracing operations from within the NETCONF or Junos XML protocol
session. If configured, tracing operations are performed for a session
only when requested through the Within a session, issue the |
size size |
(Optional) Maximum size of each trace file in bytes,
kilobytes (KB), megabytes (MB), or gigabytes (GB). If you don’t
specify a unit, the default is bytes. If you specify a maximum file
size, you also must specify a maximum number of trace files with the
|
world-readable |
(Optional) Enable unrestricted file access. |
Required Privilege Level
system—To view this statement in the configuration.
system-control—To add this statement to the configuration.
Release Information
Statement introduced in Junos OS Release 12.2.
Support for Junos XML protocol sessions added in Junos OS Release 16.1.
Option flag debug
introduced in Junos OS Release
16.1.