Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?




Hierarchy Level


Enable the logging of traffic statistics in a local file. This statement does not enable traffic statistics monitoring.

To enable the monitoring of traffic statistics, configure the traffic-statistics configuration statement at the [edit services analytics interfaces] hierarchy level.


This feature is disabled by default.


file filename

Specify a filename for storing the traffic statistics in the JavaScript Object Notification (JSON) format. The file is stored in the /var/log/ directory of your device.

If you do not specify a filename, the data is not stored in a file.

files number-of-files

Specify the number of files to store locally. After the number files with the maximum file size is reached, the system starts over and writes the data to the first file.

  • Range: 2 to 1,000 files.

interval interval

Configure the polling interval in seconds.


You can configure the polling interval for traffic statistics globally for all interfaces only. Due to limitations and variations in the hardware capability of different devices, you might see a difference in value between the actual interval and configured interval.

  • Range:

    • Junos OS Release 13.2X51-D10 or later—2 to 300 seconds (2 seconds to 5 minutes)

    • Junos OS Release 13.2X50-D15—1 to 300 seconds (1 second to 5 minutes)


    In Junos OS Release 13.2X51-D10 or later, if you configured an interval of less than 2 seconds, the following warning messages appear during the commit process:

    Traffic statistics polling interval can not be less than 2 seconds, and

    Setting Traffic statistics polling interval to 2 seconds.

    These messages do not stop the commit operation, but the interval is automatically set to 2 seconds.

  • Default:

    • Junos OS Release 13.2X50-D15—1 second

    • Junos OS Release 13.2X51-D10 or later—2 seconds

size size

Configure the file size in megabytes (MB).

  • Syntax: xm to specify MB.

  • Range: 10 to 4095 MB

Required Privilege Level

interface—To view this statement in the configuration.

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

Release Information

Statement introduced in Junos OS Release 13.2.