Technical Documentation



traffic-statistics {file filename <files number> <size size> <world-readable | no-world-readable>;interval seconds;no-penultimate-hop;}

Hierarchy Level

[edit logical-systems logical-system-name protocols ldp],[edit logical-systems logical-system-name routing-instances routing-instance-name protocols ldp],[edit protocols ldp],[edit routing-instances routing-instance-name protocols ldp]

Release Information

Statement introduced before JUNOS Release 7.4.


LDP traffic statistics display the amount of traffic passed through a router for a particular FEC.


file filename—Name of the file to receive the output of the LDP statistics operation. Enclose the name within quotation marks. All files are placed in the directory /var/log.

files number—(Optional) Maximum number of LDP statistics files. When a statistics file named ldp-stat reaches its maximum size, it is renamed ldp-stat.0, then ldp-stat.1, and so on, until the maximum number of LDP statistics files is reached. Then the oldest file is overwritten.

Range: 2 through 1000
Default: 2 files

If you specify a maximum number of files, you also must include the size statement to specify the maximum file size.

interval seconds—(Optional) Specify the interval at which the statistics are polled and written to the file.

Default: 300 seconds (5 minutes)

no-penultimate-hop—(Optional) Do not collect traffic statistics on the penultimate hop router.

no-world-readable—(Optional) Prevent all users from reading the log file.

size size—(Optional) Maximum size of each statistics file, in kilobytes (KB), megabytes (MB), or gigabytes (GB). When a statistics file named ldp-stat reaches this size, it is renamed ldp-stat.0. When ldp-stat again reaches this size, ldp-stat.0 is renamed ldp-stat.1 and ldp-stat is renamed ldp-stat.0. This renaming scheme continues until the maximum number of statistics files is reached. Then the oldest statistics file is overwritten.

Syntax: xk to specify KB, xm to specify MB, or xg to specify GB
Range: 10 KB through the maximum file size supported on your system
Default: 1 MB

If you specify a maximum file size, you also must also include the files statement to specify the maximum number of files.

world-readable—(Optional) Enable log file access for all users.

Required Privilege Level

routing—To view this statement in the configuration.

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

Published: 2010-04-28