traceoptions (RPM)
Syntax
traceoptions { file filename <files number> <match regular-expression > <size maximum-file-size> <world-readable | no-world-readable>; flag flag; }
Hierarchy Level
[edit services rpm]
Description
(Junos OS only) Define tracing operations for RPM processes.
Options
file filename |
Use the specified file to receive the output of the tracing operation. All files are placed in the directory /var/log.
|
files number |
(Optional) Use the specified maximum number of trace files to create
before overwriting the oldest one. If you specify a maximum number of
files, you also must specify a maximum file size with the
|
match regular-expression |
(Optional) Use the specified regular expression to refine the output to include lines that contain the regular expression. |
size maximum-file-size |
(Optional) Use the specified maximum size of each trace file. By default,
the number entered is treated as bytes. Alternatively, you can include a
suffix to the number to indicate kilobytes (KB), megabytes (MB), or
gigabytes (GB). 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. |
no-world-readable |
(Default) Disable unrestricted file access. This means the log file can be accessed only by the user who configured the tracing operation. |
flag flag |
Use the specified tracing operation. To specify more than one tracing
operation, include multiple
|
Additional Information
Junos OS Evolved uses a new tracing architecture. All running applications create
trace information, with multiple instances of the same application having their own
trace information. In Junos OS, you enable tracing operations by configuring the
traceoptions statement at the specific hierarchy level you want to trace. Junos OS
Evolved, on the other hand, uses an application-based model, and thus trace messages
are logged, viewed, and configured by application. As a result, Junos OS Evolved
does not support the traceoptions
statement at many of the
hierarchy levels that Junos OS supports.
In Junos OS Evolved, you do not view trace files directly, and you should never add,
edit, or remove trace files under the /var/log/traces directory
because this can corrupt the traces. Instead, you use the show trace
application application-name node
node-name
command to read and decode trace
messages stored in the trace files. All running applications on Junos OS Evolved
create trace information at the info
level by default.
RPM is governed by the rmopd
application. For Junos OS Evolved, to
configure traces for a severity other than info
for the
rmopd
application, include the application rmopd node
node-name level severity
statement at the [edit system trace] hierarchy level.
For general monitoring and troubleshooting of devices running Junos OS or Junos OS Evolved, we recommend using standard tools such as CLI show commands, system log messages, SNMP, and telemetry data. You should avoid using trace messages for general debugging purposes and long-term solutions because they are subject to change without notice.
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 13.2.
rpd
flag added in Junos OS Release 18.4R1.