linuxnetflow

How to obtain NFDUMP output in bytes using csv output


I need to obtain netflow record in csv format, but as a lot of traffic is in network, nfdump return information in MBytes. I have no choise but to use one option in NFDUMP to obtain traffic information in bytes.

My current command is:

nfdump -R netflow/ -q -o csv 'src net 33.1.1.0/24 and dst net 33.1.2.0/24' 

Solution

  • Assuming your are reading from a file:

    nfdump -r nfcapd.2017xxxxx -o extended -o csv
    

    will give headers and a summary, while:

    nfdump -r nfcapd.2017xxxxx -o extended -o csv -q
    

    removes both.

    Not quite sure how to keep only the headers.