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 EntriesMaximum number of entries allowed in the main cache
- Activity TimeoutActivity timer value
- Inactivity TimeoutInactivity timer value
- SizeDistribution of IP packets by size
- PercentPercent distribution of different-sized IP packets
- Protocol - PortProtocol of the sample and port destination for that sample
- Total FlowsTotal number of flows
- Flows/SecNumber of flows per second
- Packets/FlowNumber of packets per flow
- Bytes/PacketNumber of bytes per packet
- Packets/SecNumber of packets per second
- Src. AddrSource address of sampled packets
- Src. IntfSource interface of sampled packets
- Dst. AddrDestination address of sampled packets
- Dst. IntfDestination interface of sampled packets
- Summary
- Total Flows ProcessedTotal number of flows processed
- Total PacketsTotal number of packets sampled
- Total BytesTotal 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 2Detailed 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 cache flow aggregation
- ASAS aggregation cache
- Destination-prefixDestination-prefix aggregation cache
- PrefixPrefix aggregation cache
- Protocol-portProtocol-port aggregation cache
- Source-prefixSource-prefix aggregation cache
- Total FlowsTotal number of flows
- Flows/SecNumber of flows per second
- Packets/FlowNumber of packets per flow
- Bytes/PacketNumber of bytes per packet
- Packets/SecNumber of packets per second
- Src. AddrSource address of sampled packets
- Src. IntfSource interface of sampled packets
- Dst. AddrDestination address of sampled packets
- Dst. IntfDestination interface of sampled packets
- Summary
- Total Flows ProcessedTotal number of flows processed
- Total PacketsTotal number of packets sampled
- Total BytesTotal number of bytes received
ExampleAggregation cache flow output
host1#show ip cache flow aggregation as active brief29140 packets sampled.TotalSrc AS Dest AS Flows Packets/Flows Bytes/Pkt Packets/Sec----------------- ---------- -------------- ---------------- ---------400 100 0.000 118.000 1014.000 0.000100 400 0.008 935.000 1026.000 7.664------------------ Summary ---------------------Total Flows Processed: 2Total Packets 1053Total Bytes 1078962------------------------------------------------show ip flow export
host1#show ip flow exportFlow export is enabled using version 5 format.Exporting to 10.0.0.2 port 9898 using source ip interfaceGigabitEthernet5/0/0.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.