[Contents] [Prev] [Next] [Index] [Report an Error]


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:

The following section shows the output of the show commands used with the configuration example:

user@router1> show services flow-collector input interface cp-6/0/0 detail
Interface                      Packets        Bytes
mo-7/1/0.0                        6170      8941592

user@router1> show services flow-collector input interface cp-6/0/0 extensive
Interface                      Packets        Bytes
mo-7/1/0.0                        6260      9074096

user@router1> show services flow-collector extensive interface cp-6/0/0
Flow collector interface: cp-6/0/0
Interface state: Collecting flows
Memory:
    Used: 19593212, Free: 479528656
Input:
    Packets: 6658, per second: 0, peak per second: 0
    Bytes: 9647752, per second: 12655, peak per second: 14311
    Flow records processed: 193782, per second: 252, peak per second: 287
Allocation:
    Blocks allocated: 174, per second: 0, peak per second: 0
    Blocks freed: 0, per second: 0, peak per second: 0
    Blocks unavailable: 0, per second: 0, peak per second: 0
Files:
    Files created: 1, per second: 0, peak per second: 0
    Files exported: 0, per second: 0, peak per second: 0
    Files destroyed: 0, per second: 0, peak per second: 0
Throughput:
    Uncompressed bytes: 21075152, per second: 52032, peak per second: 156172
    Compressed bytes: 3079713, per second: 7618, peak per second: 22999
Packet drops:
    No memory: 0, Not IP: 0
    Not IPv4: 0, Too small: 0
    Fragments: 0, ICMP: 0
    TCP: 0, Unknown: 0
    Not JUNOS flow: 0
File Transfer:
    FTP bytes: 0, per second: 0, peak per second: 0
    FTP files: 0, per second: 0, peak per second: 0
    FTP failure: 0
Export channel: 0   
    Current server: Secondary
    Primary server state: OK, Secondary server state: OK
Export channel: 1
    Current server: Secondary
    Primary server state: OK, Secondary server state: OK

user@router1> show services flow-collector file interface cp-6/0/0 terse
File name                                                        Flows State
cFlowd-py69Ni69-0-20031112_014301-so_3_0_0_0.bcp.bi.gz          185643 Active

user@router1> show services flow-collector file interface cp-6/0/0 detail
Filename: cFlowd-py69Ni69-0-20031112_014301-so_3_0_0_0.bcp.bi.gz
  Throughput:
    Flow records: 187067, Uncompressed bytes: 21121960, Compressed bytes: 
2965643
  Status:
    State: Active, Transfer attempts: 0

user@router1> show services flow-collector file interface cp-6/0/0 extensive
Filename: cFlowd-py69Ni69-0-20031112_014301-so_3_0_0_0.bcp.bi.gz
  Throughput:
    Flow records: 188365, per second: 238, peak per second: 287
    Uncompressed bytes: 21267756, per second: 27007, peak per second: 32526
    Compressed bytes: 2965643, per second: 0, peak per second: 22999
  Status:
    Compressed blocks: 156, Block count: 156
    State: Active, Transfer attempts: 0

user@router1> show services flow-collector detail interface all
Flow collector interface: cp-6/0/0
Interface state: Collecting flows
  Packets     Bytes     Flows Uncompressed  Compressed     FTP bytes FTP files
                                     Bytes       Bytes
     6736   9757936    195993     21855798     3194148             0         0
Flow collector interface: cp-7/0/0
Interface state: Collecting flows
  Packets     Bytes     Flows Uncompressed  Compressed     FTP bytes FTP files
                                     Bytes       Bytes
        0         0         0            0           0             0         0

To 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 primary or secondary option when you issue the request services flow-collector destination interface cp-fpc/pic/port command. If you configure only one primary server and issue this command with the primary option, you receive the error message "Destination change not needed." If the secondary server is not configured and you issue this command with the secondary option, 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 
primary
Flow collector interface: cp-6/0/0
Interface state: Collecting flows
Destination change successful

user@router1> request services flow-collector destination interface cp-6/0/0 
secondary
Flow collector interface: cp-6/0/0
Interface state: Collecting flows
Destination change successful

To test for FTP transfers, issue the request services flow-collector test-file-transfer test interface cp-fpc/pic/port command.

user@router1> request services flow-collector test-file-transfer test interface
cp-6/0/0
Flow collector interface: cp-6/0/0
Interface state: Collecting flows
Response: Test file transfer successfully scheduled

Another 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.


Table 14: Flow Collector Interface Transfer Log Fields

Field
Explanation
fn
File name
sz
File size
nr
Number of records
ts
Time stamp with the format of year (4 digits), month (2 digits), day (2 digits), hours (2 digits), minutes (2 digits), and seconds (2 digits).
sf
Success flag—The values are 1 for success and 0 for failure.
ul
Server URL
rc
FTP result code
er
FTP error text
tt
Transfer time

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=1570

This 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."


[Contents] [Prev] [Next] [Index] [Report an Error]