Check Your Work
To verify that your flow collector configuration is working, use the following commands on the monitoring station that is configured for flow collection:
show services flow-collector file interface (detail | extensive | terse)show services flow-collector (detail | extensive)show services flow-collector input interface (detail | extensive | terse)The following section shows the output of the
showcommands used with the configuration example:user@router1>show services flow-collector input interface cp-6/0/0 detailInterface Packets Bytesmo-7/1/0.0 6170 8941592user@router1>show services flow-collector input interface cp-6/0/0 extensiveInterface Packets Bytesmo-7/1/0.0 6260 9074096user@router1>show services flow-collector extensive interface cp-6/0/0Flow collector interface: cp-6/0/0Interface state: Collecting flowsMemory:Used: 19593212, Free: 479528656Input:Packets: 6658, per second: 0, peak per second: 0Bytes: 9647752, per second: 12655, peak per second: 14311Flow records processed: 193782, per second: 252, peak per second: 287Allocation:Blocks allocated: 174, per second: 0, peak per second: 0Blocks freed: 0, per second: 0, peak per second: 0Blocks unavailable: 0, per second: 0, peak per second: 0Files:Files created: 1, per second: 0, peak per second: 0Files exported: 0, per second: 0, peak per second: 0Files destroyed: 0, per second: 0, peak per second: 0Throughput:Uncompressed bytes: 21075152, per second: 52032, peak per second: 156172Compressed bytes: 3079713, per second: 7618, peak per second: 22999Packet drops:No memory: 0, Not IP: 0Not IPv4: 0, Too small: 0Fragments: 0, ICMP: 0TCP: 0, Unknown: 0Not JUNOS flow: 0File Transfer:FTP bytes: 0, per second: 0, peak per second: 0FTP files: 0, per second: 0, peak per second: 0FTP failure: 0Export channel: 0Current server: SecondaryPrimary server state: OK, Secondary server state: OKExport channel: 1Current server: SecondaryPrimary server state: OK, Secondary server state: OKuser@router1>show services flow-collector file interface cp-6/0/0 terseFile name Flows StatecFlowd-py69Ni69-0-20031112_014301-so_3_0_0_0.bcp.bi.gz 185643 Activeuser@router1>show services flow-collector file interface cp-6/0/0 detailFilename: cFlowd-py69Ni69-0-20031112_014301-so_3_0_0_0.bcp.bi.gzThroughput:Flow records: 187067, Uncompressed bytes: 21121960, Compressed bytes: 2965643Status:State: Active, Transfer attempts: 0user@router1>show services flow-collector file interface cp-6/0/0 extensiveFilename: cFlowd-py69Ni69-0-20031112_014301-so_3_0_0_0.bcp.bi.gzThroughput:Flow records: 188365, per second: 238, peak per second: 287Uncompressed bytes: 21267756, per second: 27007, peak per second: 32526Compressed bytes: 2965643, per second: 0, peak per second: 22999Status:Compressed blocks: 156, Block count: 156State: Active, Transfer attempts: 0user@router1>show services flow-collector detail interface allFlow collector interface: cp-6/0/0Interface state: Collecting flowsPackets Bytes Flows Uncompressed Compressed FTP bytes FTP filesBytes Bytes6736 9757936 195993 21855798 3194148 0 0Flow collector interface: cp-7/0/0Interface state: Collecting flowsPackets Bytes Flows Uncompressed Compressed FTP bytes FTP filesBytes Bytes0 0 0 0 0 0 0To clear statistics for a flow collector interface, issue the
clear services flow-collector statistics interface (all |interface-name)command.Another useful flow collector option allows you to change the FTP server from primary to secondary and test for FTP transfers. To force the flow collector interface to use a primary or secondary FTP server, include the
primaryorsecondaryoption when you issue therequest services flow-collector destination interface cp-fpc/pic/portcommand. If you configure only one primary server and issue this command with theprimaryoption, you receive the error message "Destination change not needed." If the secondary server is not configured and you issue this command with thesecondaryoption, you receive the error message "Destination not configured." Otherwise, when both servers are configured properly, successful output appears as follows.user@router1>request services flow-collector destination interface cp-6/0/0 primaryFlow collector interface: cp-6/0/0Interface state: Collecting flowsDestination change successfuluser@router1>request services flow-collector destination interface cp-6/0/0 secondaryFlow collector interface: cp-6/0/0Interface state: Collecting flowsDestination change successfulTo test for FTP transfers, issue the
request services flow-collector test-file-transfer test interface cp-fpc/pic/portcommand.user@router1>request services flow-collector test-file-transfer test interfacecp-6/0/0Flow collector interface: cp-6/0/0Interface state: Collecting flowsResponse: Test file transfer successfully scheduledAnother way you can check for the success of your file transfers is by analyzing the transfer log. A transfer log sends detailed information about files that are collected and processed by the flow collector interface. Table 14 explains the various fields available in the transfer log.
This is an example of a successful transfer log:
fn="Scaling-0-20040113_001553_so_3_0_0_int_532.bcp.bi.gz":sz=7631149:nr=500002: ts="20040113001630":sf=1:ul="/tmp/DIME/:"rc=250:er="":tt=1570This is an example of an transfer log when an FTP session fails:
fn="Scaling-0-20040119_202718_so_3_0_0_int_272.bcp.bi.gz":sz=8418252:nr=500003: ts="20040119202733":sf=0:ul="/tmp/DIME/:"rc=550:er="550 Scaling-0-20040119_202718_so_3_0_0_int_272.bcp.bi.gz.tmp: No such file or directory."