首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在linux上,"net_ratelimit: 44个回调被抑制“是什么意思?

在linux上,"net_ratelimit: 44个回调被抑制“是什么意思?
EN

Server Fault用户
提问于 2011-06-04 15:42:07
回答 1查看 130.9K关注 0票数 21

我正试图在基于Debian的路由器上优化Snort性能。我看到的东西是:

代码语言:javascript
运行
复制
snort packet recv contents failure: No buffer space available

因此,我将缓冲器提高到了8M,当它不起作用时,我尝试了16M,根据http://fasterdata.es.net/fasterdata/host-tuning/linux/的调优指南:

代码语言:javascript
运行
复制
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Increase TCP Buffers to 16 MB
sysctl -w net.core.rmem_default='16777216'
sysctl -w net.core.wmem_default='16777216'
sysctl -w net.core.rmem_max='16777216'
sysctl -w net.core.wmem_max='16777216'
sysctl -w net.ipv4.tcp_wmem='1048576 4194304 16777216'
sysctl -w net.ipv4.tcp_rmem='1048576 4194304 16777216'
sysctl -w net.core.netdev_max_backlog='30000'
exit 0

现在我没有看到“没有缓冲区空间”的日志条目,但是我有了一个新的条目:

代码语言:javascript
运行
复制
net_ratelimit: 44 callbacks suppressed

来自同一时间框架的唯一其他信息是这些火星人,也许这就是被压制的原因?

代码语言:javascript
运行
复制
Jun  4 07:09:36 ilium ntpd_intres[3575]: host name not found: 0.us.pool.ntp.org
Jun  4 14:17:36 ilium kernel: [25743.259951] net_ratelimit: 44 callbacks suppressed
Jun  4 14:17:36 ilium kernel: [25743.259955] martian source 216.59.11.21 from 127.0.0.1, on dev eth0
Jun  4 14:17:36 ilium kernel: [25743.259956] ll header: 00:30:48:7c:f8:10:00:24:c4:49:8d:00:08:00
Jun  4 14:17:58 ilium kernel: [25765.055449] martian source 216.59.11.21 from 127.0.0.1, on dev eth0
Jun  4 14:17:58 ilium kernel: [25765.055451] ll header: 00:30:48:7c:f8:10:00:24:c4:49:8d:00:08:00
Jun  4 14:18:43 ilium kernel: [25809.998978] martian source 216.59.11.21 from 127.0.0.1, on dev eth0
Jun  4 14:18:43 ilium kernel: [25809.998980] ll header: 00:30:48:7c:f8:10:00:24:c4:49:8d:00:08:00
Jun  4 14:24:11 ilium kernel: [26138.700143] martian source 216.59.11.71 from 127.0.0.1, on dev eth0
Jun  4 14:24:11 ilium kernel: [26138.700145] ll header: 00:30:48:7c:f8:10:00:24:c4:49:8d:00:08:00
Jun  4 14:28:42 ilium kernel: [26409.130701] martian source 216.59.11.71 from 127.0.0.1, on dev eth0
Jun  4 14:28:42 ilium kernel: [26409.130703] ll header: 00:30:48:7c:f8:10:00:24:c4:49:8d:00:08:00
EN

回答 1

Server Fault用户

回答已采纳

发布于 2011-06-05 04:50:03

net_ratelimit()”用于限制来自内核的syslog消息。

这个“回调抑制”消息意味着它抑制了44条syslog消息。

这是一种避免加载syslog日志记录路径的尝试。

如果您有兴趣的话,这里是源参考,

FreeBSD/Linux内核交叉引用;sys/net/core/utils.c

它叫sys/lib/棘轮划界.c -- ___ratelimit()

你也许想调查一下你的"火星人源",

但是如果你忽视它,我想,棘轮将处理原木。

(修复未知的日志源通常是个好主意)。

在你的例子中,你的火星人包看起来是,

源或目的地址在127.0.0.0/8范围内的传入或传出数据包,保留给主机内的回送。

票数 23
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/277009

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档