SUSE Linux ShutdownManager issue
在管理华为HP DL580服务器的最近几天,系统经常莫名其妙的挂掉,我查看系统日志,曾经出现过OOM -Killer,系统是47个CPU和32G内存,8G的交换页,按理说这么样的配置不会出问题,但是华为OMStar预处理工具处理5G的UMTS MR数据的时候还是将内存耗尽了,日志中出现Free swap = 0kB 。这个问题这两天还没解决,等解决了再分享下经验。我估计OMStar预处理的时候有缺陷,内存有没有释放的地方,因为MPPF sleep进程竟然占据这几乎20G的内存。另外也有可能和下面的配置有关:
/proc/sys/vm/overcommit_memory
该文件指定了内核针对内存分配的策略,其值可以是0、1、2。
0, 表示内核将检查是否有足够的可用内存供应用进程使用;如果有足够的可用内存,内存申请允许;否则,内存申请失败,并把错误返回给应用进程。
1, 表示内核允许分配所有的物理内存,而不管当前的内存状态如何。
2, 表示内核允许分配超过所有物理内存和交换空间总和的内存(参照overcommit_ratio)。
缺省设置:0
前面说了那么多一大堆废话,今天要说的是另外一个问题,在我查看日志的时候,有几次莫名其妙的看到有一下信息:
zmd: ShutdownManager (WARN): Preparing to sleep...
zmd: ShutdownManager (WARN): Going to sleep, waking up at XXXX
看字面意思像是电源管理的问题,系统莫名其妙的sleep了。在网上搜索了下,有很多人出现过这中现象,还有人每天都出现:
This is my extraction from /etc/log/warn
Jan 5 23:00:44 suse64x2 zmd: ShutdownManager (WARN): Preparing to sleep...
Jan 5 23:00:44 suse64x2 zmd: ShutdownManager (WARN): Going to sleep, waking up at 01/06/2007 21:50:44
Jan 7 01:40:24 suse64x2 zmd: ShutdownManager (WARN): Preparing to sleep...
Jan 7 01:40:24 suse64x2 zmd: ShutdownManager (WARN): Going to sleep, waking up at 01/08/2007 00:30:24
Jan 7 14:27:38 suse64x2 zmd: ShutdownManager (WARN): Preparing to sleep...
Jan 7 14:27:38 suse64x2 zmd: ShutdownManager (WARN): Going to sleep, waking up at 01/08/2007 13:17:38
Jan 7 16:16:03 suse64x2 zmd: ShutdownManager (WARN): Preparing to sleep...
Jan 7 16:16:03 suse64x2 zmd: ShutdownManager (WARN): Going to sleep, waking up at 01/08/2007 15:06:03
Jan 8 23:34:22 suse64x2 zmd: ShutdownManager (WARN): Preparing to sleep...
Jan 8 23:35:19 suse64x2 zmd: ShutdownManager (WARN): Going to sleep, waking up at 01/09/2007 22:24:22
Jan 10 21:21:35 suse64x2 zmd: ShutdownManager (WARN): Preparing to sleep...
Jan 10 21:21:35 suse64x2 zmd: ShutdownManager (WARN): Going to sleep, waking up at 01/11/2007 20:11:35
Jan 10 23:50:06 suse64x2 zmd: ShutdownManager (WARN): Preparing to sleep...
貌似他是按下面的方法解决的:There is a zmd.conf file which looks like this: (也就是说有个如下所示的zmd.conf文件)
suse64x2:/var/log # cat /etc/zmd/zmd.conf
[Advanced]
run-transaction-test=False
security-level=signature
[Server]
bind-ip=127.0.0.1
refresh-interval=86400
remote-enabled=false
require-verified-certs=True
[Debug]
log-soap-xml=False
log-exception-traces=False
The line to take notice of is the one with 86400 which is 60 X 60 X 24 or the numbers of seconds in a day. One would think that zmd would go to sleep, not the whole computer so I went to the YAST > system > services and disabled Novell zmd. I will see what happens in the next few days. What the final fix should be I have no idea. I don't think Novell intended on locking the computer in hibernation but that seems to be what has happened.
-----------------------
注意看上文中的86400,86400=60*60*24,也就是一天的秒数,所以才会一天出现一次sleep,所以打开YAST > system > services 然后将Novell zmd设置成disable。
这家伙反正是这样搞定了,明天去公司,我也这样设置下吧,最起码日志中不应该再出现 zmd: ShutdownManager (WARN): Preparing to sleep...
zmd: ShutdownManager (WARN): Going to sleep, waking up at XXXX 这种issue了。