ubuntu14.04安装pf_ring,运行程序时提示mmap()failed:try with a smaller snaplen
通过lsmod查看系统加载项的时候pf_ring.ko和e1000e.ko也都是正常加载的,但是通过dmesg查看信息是会看到
[PF_RING]ERROR: not enough memory for ring
[PF_RING]ring_mmap():unable to allocate memory
这个怎么解决啊,求大神啊
是不是系统内存不够。
没有足够的内存用于PF_RING
请尝试使用更小的 snaplen
参见:http://blog.chinaunix.net/uid-10540984-id-3240755.html
文章中的相关代码段:
#define SNAP_LEN 1518
/* 打开pf设备 */
pd = pfring_open(in_dev, SNAP_LEN, PF_RING_PROMISC);