如何抓IPLOG,如何将抓到的LOG循环写
tcpdump -i any -s 0 -C 20 -W 3 -w ./ip.pcap -Z root
-i : 设备名
-s : 过滤包大小限制
-C :(M), 定义生成文件大小,兆为单位,取整数
-W : 可生成多少个文件
-w :指定生成文件的路径
-Z :如果想循环写文件,此选项必须有,不然会有
tcpdump -i any -s 0 -C 1 -W 2 -w ./ip.pcap
tcpdump: WARNING: Promiscuous mode not supported on the "any" device
tcpdump: listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
tcpdump: ./ip.pcap1: Permission denied
所以综上所述基本满足需求,其它功能自己研究。