statistics (Protocols MPLS)
Syntax
statistics {
auto-bandwidth (MPLS Statistics);
file filename <files number> <size size> <world-readable | no-world-readable>;
interval seconds;
no-transit-statistics;
traffic-class-statistics;
transit-statistics-polling;
statistics-query-batch-size <batch-size>;
}
Hierarchy Level
[edit logical-systems logical-system-name protocols mpls], [edit protocols mpls]
Description
Enable MPLS statistics collection and reporting.
Options
file filename—(Optional) Name of the file to
receive the output. We recommend that you place MPLS tracing output in the file
mpls-stat in the /var/log directory.
files number—(Optional) Maximum number of trace
files. When a trace file named file reaches its maximum size, it
is renamed file.0, then file.1, and so on,
until the maximum number of files is reached. Then, the oldest file is overwritten.
-
Range: 2 or more
-
Default: 2 files
If you specify a maximum number of files, you also must specify a maximum file size
with the size option.
interval seconds—Interval at which to
periodically collect statistics.
-
Range: 1 through 65,535
-
Default: 300 seconds
no-world-readable—(Optional) Prevent users from reading the log
file.
size size—(Optional) Maximum size of each file,
in kilobytes (KB), megabytes (MB), or gigabytes (GB). When a file named
file reaches this size, it is renamed
file.0. When the file again reaches its
maximum size, file.0 is renamed file.1 and
file is renamed file.0. This renaming
scheme continues until the maximum number of 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 files
with the files option.
world-readable—(Optional) Enable users to read the log file.
-
Syntax: Syntax:
xkto specify KB,xmto specify MB, orxgto specify GB
-
Range: 10 KB through the maximum file size supported on your system
-
Default: 1 MB
traffic-class-statistics—(Optional) Create counters that maintain
data traffic statistics per traffic class at the ingress of all types of LSPs and
egress of ultimate hop popping (UHP) point-to-point LSPs. These counters are not
created by default and are required to be configured to perform traffic-class-scoped
loss measurement.
transit-statistics-polling—(Optional) Enable the polling and display
of MPLS statistics for LSPs transiting the router. By default, RSVP does not
periodically poll for transit LSP statistics. You cannot configure this statement
and the no-transit-statistics statement at the same time.
statistics-query-batch-size—(Optional) Indicates the number of LSPs
for which statistics will be queried together. By default, the system collects
periodic statistics for Label Switched Paths (LSPs) one query at a time. It
initiates each subsequent request only after receiving a response to the previous
request, which limits efficiency in large-scale deployments. Use batching to enhance
performance and reduce latency. The statistics-query-batch-size parameter groups
multiple LSP statistics requests (1–25) into a single request. Adjust the parameter
to optimize performance. You can set an appropriate parameter value to match your
deployment scale and performance requirements.
-
Range: 1 to 25.
-
Note: If you do not configure statistics-query-batch-size value, by default, the batch size is 1.
The remaining statements are explained separately. See CLI Explorer.
Required Privilege Level
routing and trace—To view this statement in the configuration.
routing-control and trace-control—To add this statement to the configuration.
Release Information
Statement introduced before Junos OS Release 7.4.
traffic-class-statistics option introduced in Junos OS Release
14.2.