# aggregate by destination AS, sort by octets.
% flow-cat <data> flow-report -vTYPE=source-as -vSORT=+octets

# aggreate by src AS, sort by packets.
% flow-cat <data> flow-report -vTYPE=destination-as -vSORT=+packets

Or you can use the flow-report config file and run both reports at the same time. By running the reports at the same time you will use less disk i/o, less CPU cycles to decompress the flows at the expense of more memory.

#!/bin/sh

# run reports for yesterday, save output in reports/YY-MM-DD/report-name
# run on flow-files from /flows/YY/YY-MM/YY-MM-DD/*

RUNDAY="-1d"
YY=`date -v "$RUNDAY" '+%Y'`
MM=`date -v "$RUNDAY" '+%m'`
DD=`date -v "$RUNDAY" '+%d'`

YYMMDD_DIR_RUNDAY="$YY/$YY-$MM/$YY-$MM-$DD"
FLOWDIR="/flows/$YYMMDD_DIR_RUNDAY"
RPTDIR="reports/$YY-$MM-$DD"

flow-cat $FLOWDIR | flow-report -s report.cfg -Sdaily "-vWORK=$RPTDIR"

flow-report -s report.cfg


stat.cfg:

stat-report SRC-AS
  type source-as
  output
    options +header,+xheader
    sort +octets
    fields -duration
    path @WORK/source-as.txt

stat-report DST-AS
  type destination-as
  output
    options +header,+xheader
    sort +octets
    fields -duration
    path @WORK/destination-as.txt

stat-definition daily
  report SRC-AS
  report DST-AS


Then use flow-rptfmt to format the output, or just call flow-rptfmt directly from the report.cfg file.

--
mark

On May 10, 2005, at 1:04 PM, Lars Lystrup Christensen wrote:

Hi there
 
Is it possible to create a report that specifies how much traffic is sent and received from each AS I contact?
 
I know it’s possible to do it partly with “flow-stat –f 21”, but then I’d have to do the sorting my self. I could also use “flow-stat –f 19” and “flow-stat –f 20” and then compare the 2 results into a single file (ie. With Excel or something similar), but that seems a bit too much work when I know the management team wants this report weekly.
 
______________________________________
Med venlig hilsen / Kind regards

Lars Lystrup Christensen
 IP Operations Technician

Danske Telecom A/S
Lautrupsgade 9, 2
 2100 København Ø

[EMAIL PROTECTED]
+45 35 27 50 00 (Office)
 +45 35 27 50 50 (Fax)
 +45 35 27 50 23 (Direct)
 +45 40 60 55 23 (Mobile)

www.dansketelecom.com 

This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.
 
_______________________________________________
Flow-tools mailing list
[EMAIL PROTECTED]
http://mailman.splintered.net/mailman/listinfo/flow-tools
_______________________________________________
Flow-tools mailing list
[EMAIL PROTECTED]
http://mailman.splintered.net/mailman/listinfo/flow-tools

Reply via email to