我注意到几天前发现同样重复的消息,我可以肯定地说在那个时期没有什么是有意改变的(安装/卸载)。
这里是/var/log/kern.log消息的示例:
Mar 30 06:32:45 aurora kernel: [566322.867110] e1000e: eth0 NIC Link is Down Mar 30 06:32:47 aurora kernel: [566325.313634] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx Mar 30 06:32:59 aurora kernel: [566337.632930] e1000e: eth0 NIC Link is Down Mar 30 06:33:18 aurora kernel: [566356.543664] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None Mar 30 11:05:47 aurora kernel: [582689.779752] e1000e: eth0 NIC Link is Down Mar 30 11:05:50 aurora kernel: [582692.174337] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
从完整的日志文件 – 当所有的日志消息这种计数 – 我可以得出结论:
这是我在这里讨论的生产服务器。
如何解决这个问题,因为邮件服务器在生产和19秒的networking故障持续时间,我不能容忍?
ifconfig输出中的“错误”字段。 如果非零,则硬件(电缆,NIC卡或集线器/交换机)出现问题。 不可靠的以太网电缆也会在这个领域出错。 ethtool并确保networking设置(双工等)与交换机上的相匹配。 如果您不是交换机的pipe理员,请询问networkingpipe理员为您提供设置。 作为一个方面说明,你应该评估你是否需要stream量控制。 根据惠普的说法,这只是高性能应用的必要条件:请参阅惠普关于何时使用stream量控制的文章
这是我的修复。 这个问题发生在特定的硬件上(在一台机器上只有2个端口中的1个),从内核3.9开始,总是使用e1000e驱动程序。 这个文件是用于centos7的,进入/etc/init.d/并且必须使用chkconfig --add <name>来启用。 接口名称是硬编码的…一定要设置它。
#!/bin/sh ### BEGIN INIT INFO # Provides: pm-e1000e-fix # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 6 # Short-Description: workaround for e1000e issue # Description: e1000e fix ### END INIT INFO ################################################################################ # Give Usage Information # ################################################################################ usage() { echo "Usage: $0 start|restart" >&2 exit 1 } ################################################################################ # EXECUTIONBEGINSHERE # ################################################################################ command="$1" shift interface="eth0" case "$command" in start) ethtool -K "$interface" gso off gro off tso off ;; restart) ethtool -K "$interface" gso off gro off tso off ;; *) usage ;; esac