免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5064 | 回复: 0
打印 上一主题 下一主题

[其他] centos7 网卡时常down,求分析 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2017-02-05 09:24 |只看该作者 |倒序浏览
本帖最后由 bamqjurgg 于 2017-02-05 09:52 编辑

测试服务器基础信息:

操作系统:CentOS7.0
服务器型号:PowerEdge T620
网卡型号:
06:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
06:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)

网卡驱动版本:
driver: igb
version: 5.3.0-k
firmware-version: 1.56, 0x800009a1, 14.0.12
expansion-rom-version:
bus-info: 0000:06:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no


网卡经常莫名奇妙的down掉,宿主机上装了kvm,尤其是在还原快照时网卡down或者直接系统自动重启了

其message相关信息为:
  1. Jan 24 10:05:20 develop systemd: Started Network Manager Script Dispatcher Service.
  2. Jan 24 10:05:20 develop dbus-daemon: dbus[711]: [system] Successfully activated service 'org.freedesktop.machine1'
  3. Jan 24 10:05:20 develop dbus[711]: [system] Successfully activated service 'org.freedesktop.machine1'
  4. Jan 24 10:05:20 develop systemd: Started Virtual Machine and Container Registration Service.
  5. Jan 24 10:05:20 develop systemd-machined: New machine qemu-1-win2k8.
  6. Jan 24 10:05:20 develop systemd: Unit iscsi.service cannot be reloaded because it is inactive.
  7. Jan 24 10:05:20 develop systemd: Started Virtual Machine qemu-1-win2k8.
  8. Jan 24 10:05:20 develop systemd: Starting Virtual Machine qemu-1-win2k8.
  9. Jan 24 10:05:21 develop kvm: 1 guest now active
  10. Jan 24 10:05:21 develop journal: libvirt version: 2.0.0, package: 10.el7_3.2 (CentOS BuildSystem <http://bugs.centos.org>, 2016-12-06-19:53:38, c1bm.rdu2.centos.org)
  11. Jan 24 10:05:21 develop journal: hostname: develop.org
  12. ----->注意的地方
复制代码
因为网卡时常down,故写了个简单的脚本当ping几次返回全是丢失时就重启网卡
  1. #!/bin/bash
  2. export PAHT=$PATH
  3. set -x
  4. test=`ping -c 5 192.168.8.254 | grep "100% packet loss" | wc -l`
  5. test
  6. echo $test
  7. if [ $test = 0 ];
  8. then
  9.         echo `date` >> logs
  10.         echo "The network is working" >> logs
  11. else
  12.         /usr/sbin/ifconfig em1 up
  13. fi
复制代码

crond日志显示脚本正常执行
  1. <blockquote>Jan 24 10:05:01 develop CROND[2479]: (root) CMD (/root/network.sh            > /dev/null 2>&1)
复制代码

但自写脚本的日志记录如下,从10点10分过后是一直执行 /usr/sbin/ifconfig em1 up 但是没有起作用
  1. [root@develop ~]# cat logs  | grep -A 20 "Jan 24"
  2. Tue Jan 24 10:05:05 CST 2017
  3. The network is working
  4. Tue Jan 24 10:10:05 CST 2017
  5. The network is working
  6. Sun Feb 5 08:55:05 CST 2017
  7. The network is working
  8. Sun Feb 5 09:00:05 CST 2017
  9. The network is working
  10. Sun Feb 5 09:05:05 CST 2017
  11. The network is working

复制代码
附上内核相关crash
  1. [root@develop crash]# pwd
  2. /var/crash
  3. [root@develop crash]# ll
  4. total 0
  5. drwxr-xr-x 2 root root 42 Jan 11 08:34 127.0.0.1-2017-01-10-19:34:32
  6. drwxr-xr-x 2 root root 42 Jan 13 11:03 127.0.0.1-2017-01-12-22:02:59
  7. drwxr-xr-x 2 root root 42 Jan 18 19:31 127.0.0.1-2017-01-18-06:31:27
  8. drwxr-xr-x 2 root root 42 Jan 18 21:22 127.0.0.1-2017-01-18-08:22:22
  9. drwxr-xr-x 2 root root 42 Jan 18 21:54 127.0.0.1-2017-01-18-08:54:20
  10. drwxr-xr-x 2 root root 42 Jan 19 10:02 127.0.0.1-2017-01-18-21:02:10
  11. drwxr-xr-x 2 root root 42 Jan 19 10:50 127.0.0.1-2017-01-18-21:50:43
复制代码


由于ssh无法连接,故手工重启服务器,求帮助,遇到这种情况如何分析,从上边的错误看出,可能时磁盘问题,网卡驱动也是手工重新装的最新版,centos7自带的本版太频繁down,换了新版本稍微稳定些
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP