系统日志 time wait、__ratelimit、 SYN flooding含义

服务var/log/messages出现几种日志:

kernel: TCP: time wait bucket table overflow

kernel: __ratelimit: 5400 callbacks suppressed

kernel: possible SYN flooding on port 80. Sending cookies.

根据网上部分资料:

kernel: TCP: time wait bucket table overflow

是因为net.ipv4.tcp_max_tw_buckets过小导致。调整/etc/sysctl.conf中net.ipv4.tcp_max_tw_buckets值。

kernel: __ratelimit: 5400 callbacks suppressed

是因为kernel: TCP: time wait bucket table overflow错误过多导致。

含义是:限制了一些系统日志输出。避免加载日志路径。这里的5400条就已经很多了,也说明系统log信息太多导致,需要注意。

可以参见:

'net_ratelimit()' is used to limit syslog messages from kernel.
This "callbacks suppressed" message implies it suppressed a bulk of 44 syslog messages.
This is an attempt to avoid loading your syslog logging path.

Here is the source reference if you are interested,
FreeBSD/Linux Kernel Cross Reference; sys/net/core/utils.c,
It calls sys/lib/ratelimit.c -- ___ratelimit()

以及

int ___ratelimit(struct ratelimit_state *rs, const char *func)
{
         unsigned long flags;
   31         int ret;
   32 
   33         if (!rs->interval)
   34                 return 1;
   35 
   36         /*
   37          * If we contend on this state's lock then almost
   38          * by definition we are too busy to print a message,
   39          * in addition to the one that will be printed by
   40          * the entity that is holding the lock already:
   41          */
   42         if (!raw_spin_trylock_irqsave(&rs->lock, flags))
   43                 return 0;
   44 
   45         if (!rs->begin)
   46                 rs->begin = jiffies;
   47 
   48         if (time_is_before_jiffies(rs->begin + rs->interval)) {
   49                 if (rs->missed)
   50                         printk(KERN_WARNING "%s: %d callbacks suppressed\n",
   51                                 func, rs->missed);
   52                 rs->begin   = 0;
   53                 rs->printed = 0;
   54                 rs->missed  = 0;
   55         }

 

参考资料:

http://serverfault.com/questions/277009/what-does-net-ratelimit-44-callbacks-suppressed-mean-on-a-linux-based-router

http://fxr.watson.org/fxr/source/lib/ratelimit.c?v=linux-2.6

http://lxr.oss.org.cn/source/lib/ratelimit.c?v=2.6.30

转载于:https://www.cnblogs.com/magic-xiao/p/3664097.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值