Configuring MPLS to Gather Statistics
You can configure MPLS so that it periodically gathers traffic statistics about all MPLS sessions, including transit sessions, by configuring the statistics statement. You must configure the statistics statement if you want to collect MPLS traffic statistics using SNMP polling of MPLS Management Information Bases (MIBs).
To enable or disable MPLS statistics collection, include the statistics statement:
You can configure these statements at the following hierarchy levels:
[edit protocols mpls]
[edit logical-systems logical-system-name protocols mpls]
The default interval is 300 seconds.
If you configure the file option, the statistics are placed in a file, with one entry per LSP. During the specified interval, the following information is recorded in this file:
The number of packets, number of bytes, packets per second, and bytes per second transmitted by each LSP. Feature parity for the display of packet and byte statistics for sub-LSPs of a point-to-multipoint LSP on the Junos Trio chipset is supported in Junos OS Releases 11.1R2, 11.2R2, and 11.4.
The percent of bandwidth transmitted over a given LSP in relation to the bandwidth percentage configured for that LSP. If no bandwidth is configured for an LSP, 0 percent is recorded in the percentage column.
At the end of each periodic report, a summary shows the current time, total number of sessions, number of sessions read, number of sessions ignored, and read errors, if any. Ignored sessions are typically those not in the up state or those with a reserved (0 through 15) incoming label (typically the egress point of an LSP). The reason for a read error appears on the same line as the entry for the LSP on which the error occurred. Gathering statistics is an unreliable process; occasional read errors might affect their accuracy. Sample output follows:
lsp6 0 pkt 0 Byte 0 pps 0 Bps 0 lsp5 0 pkt 0 Byte 0 pps 0 Bps 0 lsp6.1 34845 pkt 2926980 Byte 1049 pps 88179 Bps 132 lsp5.1 0 pkt 0 Byte 0 pps 0 Bps 0 lsp4 0 pkt 0 Byte 0 pps 0 Bps 0 Dec 7 17:28:38 Total 6 sessions: 5 success, 0 fail, 1 ignored