i want to do live capture and extract specific fields like ip.src ip.dst , .. then save the result in multiple csv files using ring buffer i found that if i used this command tshark -r 111.pcap -T fields -e frame.number -e frame.time -e ip.src -e ip.dst -e data.text -e tcp.analysis.duplicate_ack -e tcp.analysis.out_of_order -e tcp.analysis.retransmission -e tcp.analysis.fast_retransmission -e tcp.analysis.spurious_retransmission -e tcp.analysis.zero_window -e tcp.stream -e tcp.srcport -e tcp.dstport -e data.len -E header=y -E separator=, -E quote=d >out.csv tshark will read from 111.pcap file and save mentioned fields in out.csv file i want to apply the same but in live capture and save the result in multiple csv files using ring buffer so i tried to use this command tshark -i 3 -b files:5 -T fields -e frame.number -e frame.time -e ip.src -e ip.dst -e data.text -e tcp.analysis.duplicate_ack -e tcp.analysis.out_of_order -e tcp.analysis.retransmission -e tcp.analysis.fast_retransmission -e tcp.analysis.spurious_retransmission -e tcp.analysis.zero_window -e tcp.stream -e tcp.srcport -e tcp.dstport -e data.len -E header=y -E separator=, -E quote=d >out.csv it give me (( tshark :multiple capture files requested but the capture isn't being saved to file)) why? i think it need capture filter but couldn't write one for all these fields ? thank you asked 18 Jan '15, 11:56 shady |
One Answer:
The error means you gave a " Also, you were not using a "display filter" - you were just telling tshark to print out those specific fields instead of its normal output. It's just that what it was printing to the screen was being redirected to a file by your shell/OS.
I don't know a way to do that. You could just run tshark to save live to 5 capture files in a ring, and then separately run tshark again for each of those saved files to save the specific fields to a CSV file, as you did before. answered 18 Jan '15, 14:18 Hadriel |
thank you very much for explaining
i planning to create batch file to handle these 5 pcap files from live capture to covert them to csv file while live capture is running
any help here