Monitoring J-Flow Statistics
This section shows how to clear J-Flow statistics and use the show commands to view J-Flow settings and statistical results.
Clearing J-Flow Statistics
Use the clear ip flow stats command to clear all entries from all flow caches on the virtual router.
clear ip flow stats
host1(config)#clear ip flow statsThere is no no version. J-Flow show Commands
You can monitor the following aspects of J-Flow statistics by using the following commands:
You can use the output filtering feature of the show command to include or exclude lines of output based on a text string that you specify. See JUNOSe System Basics Configuration Guide, Chapter 2, Command-Line Interface, for details.
show ip cache flow
- Max Entries—Maximum number of entries allowed in main cache
- Activity Timeout—Activity timer value
- Inactivity Timeout—Inactivity timer value
- Size—Distribution of IP packets by size
- Percent—Percent distribution of different-sized IP packets
- Protocol - Port—Protocol of the sample and port destination for that sample
- Total Flows—Total number of flows
- Flows/Sec—Number of flows per second
- Packets/Flow—Number of packets per flow
- Bytes/Pkt—Number of bytes per packet
- Packets/Sec—Number of packets per second
- Src. Addr—Source address of sampled packets
- Src. Intf—Source interface of sampled packets
- Dst. Addr—Destination address of sampled packets
- Dst. Intf—Destination interface of sampled packets
- Summary
- Total Flows Processed—Total number of flows processed
- Total Packets—Total number of packets sampled
- Total Bytes—Total number of bytes received
host1#show ip cache flow active brief29140 packets sampled.Distribution of IP packets by size.Size Percent---------- -------1 - 32 0.00064 0.00096 0.000128 0.000160 0.000192 0.000224 0.000256 0.000288 0.000320 0.000352 0.000384 0.000416 0.000448 0.000480 0.000512 0.000544 0.000576 0.0001024 96.7911536 3.2092048 0.0002560 0.0003072 0.0003584 0.0004096 0.0004608 0.000Total Flows Packets Bytes PacketsProtocol-Port Flows /Sec /Flow /Pkt /Sec------------------- ---------- --------- ------------ --------- -----------TCP-telnet 1 0.000 118.000 1014.000 0.000UDP-whois++ 1 0.008 935.000 1026.000 7.664------------------ Summary ---------------------Total Flows Processed: 2Total Packets 1053Total Bytes 1078962------------------------------------------------
- Example 2—Detailed output
NOTE: The output format for this command was modified slightly to fit within the confines of this document.
host1#show ip cache flow active detailMain CacheMax Entries: 65536Activity Timeout: 60 mins.Inactivity Timeout: 600 secs.Cache Enabled32012 packets sampled.Distribution of IP packets by size.Size Percent---------- -------1 - 32 0.00064 0.00096 0.000128 0.000160 0.000192 0.000224 0.000256 0.000288 0.000320 0.000352 0.000384 0.000416 0.000448 0.000480 0.000512 0.000544 0.000576 0.0001024 96.7891536 3.2112048 0.0002560 0.0003072 0.0003584 0.0004096 0.0004608 0.000Packets Bytes PacketsSrc.Addr Src.Intf Dst.Addr Dst.Intf Protocol Port /Flow /Packet /Sec------------- --------- --------- ---------- --------------- --------- --------- ---------10.20.30.41 258 GigE4/0 12.0.0.2 GigE2/0 TCP-telnet 58.000 1014.000 0.00010.20.30.41 63 GE4/0 50.60.70.88 UDP-whois++ 1028.000 1026.000 7.672------------------ Summary ---------------------Total Flows Processed: 2Total Packets 1086Total Bytes 1113540------------------------------------------------host1#show ip cache flow history35604 packets sampled.Distribution of IP packets by size.Size Percent---------- -------1 - 32 0.00064 0.00096 0.000128 0.000160 0.000192 0.000224 0.000256 0.000288 0.000320 0.000352 0.000384 0.000416 0.000448 0.000480 0.000512 0.000544 0.000576 0.0001024 96.7841536 3.2162048 0.0002560 0.0003072 0.0003584 0.0004096 0.0004608 0.000Total Flows Packets Bytes PacketsProtocol Port Flows /Sec /Flow /Pkt /Sec------------------- ---------- --------- ------------ --------- -----------TCP-telnet 216 1.450 159.264 1014.000 230.879------------------ Summary ---------------------Total Flows Processed: 216Total Packets 34401Total Bytes 34882614------------------------------------------------show ip flow sampling
host1#show ip flow samplingFlow sampling is enabled'Packet Interval' sampling mode is configured.1 out of every 1000 packets is being sampled.show ip flow export
host1#show ip flow exportFlow export is enabledExporting flows to 40.0.0.2 (9991)Exporting using source IP address 40.0.0.1Version 5 flow records2 flows exported in 1 udp datagrams0 flows failed due to lack of export packet0 export packets were sent up to process level0 export packets were dropped due to no fib0 export packets were dropped due to adjacency issues0 export packets were dropped due to fragmentation failures0 export packets were dropped due to encapsulation fixup failures