一台服务器设备,反复重启,每天重启数次。

 

一: 原因分析及初步排异。

1.  硬件,内存主板,一一更换,甚至除了硬盘将整台机器都换掉了,依然重启。

2.  排除电源问题,换了电源线,换了插座,还是重启。

3.  那么接下来,还有三种可能:

  A。内核问题,内核crash。(redhat的稳定性还是十分让人信赖的,这种可能性不高)

  B。硬盘或文件系统故障。本质上,这样会导致内核crash。

  C。程序自主reboot。(我们自己的程序reboot,或进了黑客放了reboot脚本。好无聊的黑客。。。。)

 

二: 最好排除的,就是先解决内核的问题。

  内核在crash那一刻是会发现,自己即将crash的,于是他会在临死前留下一些信息。告诉用户我发生了什么。 可是问题在于:文件系统的复杂性,会导致内核临死之前文件系统也随之崩溃了。

  通过重启之后查看日志,确实没有留下有用的信息。

  这是时候我们还有另一种手段,netcosole,他的功能是吧内核日志从socket以udp的方式,自组IP包而不走协议栈,讲包推出网卡端口。包的格式为syslog格式。

netcosole使用:

1.  修改配置文件

[root@S205 ~]# cat /etc/sysconfig/netconsole                                                                                                                                                 
# This is the configuration file for the netconsole service.  By starting                                                                                                                    
# this service you allow a remote syslog daemon to record console output                                                                                                                     
# from this system.

# The local port number that the netconsole module will use
LOCALPORT=6666

# The ethernet device to send console messages out of (only set this if it
# can't be automatically determined)
DEV=enp3s0

# The IP address of the remote syslog server to send messages to
SYSLOGADDR=192.168.10.214

# The listening port of the remote syslog daemon
SYSLOGPORT=514

# The MAC address of the remote syslog server (only set this if it can't
# be automatically determined)
SYSLOGMACADDR=40:8d:5c:22:53:18
[root@S205 ~]# 
cat /etc/sysconfig/netconsole

相关文章:

  • 2021-11-25
  • 2022-02-10
  • 2021-07-15
  • 2022-12-23
  • 2021-09-01
  • 2021-05-01
猜你喜欢
  • 2021-05-04
  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2022-01-26
  • 2021-07-12
  • 2021-05-03
相关资源
相似解决方案