aixjc
作者aixjc·2010-08-12 17:40
·

AIX HACMP httpd Apache定期重启 "[notice] SIGHUP received."

字数 1601阅读 3062评论 0赞 0
原因: HACMP 5.3升级导致  /usr/es/sbin/cluster/utilities/clcycle 内容更新,从而在crontab内
"0 0 * * * /usr/es/sbin/cluster/utilities/clcycle 1>/dev/null 2>/dev/null # HACMP for AIX Logfile rotation"调用时,会搜索httpd的pid然后发送restart
从而导致
Apache的error_log中不断记录
[notice] SIGHUP received. Attempting to restart

处理方法:
# cd /usr/es/sbin/cluster/utilities/
# cp clcycle clcycle.bak
# chmod 700 clcycle
# vi clcycle
查找     # Send a SIGHUP to the primary HTTPD process to reset the logs
将其下面行添加“#”注释掉
#    typeset -i count=1
#    typeset PPID= PID=
#    for value in $(ps -ef | grep httpd | grep -v grep | head -1)
#    do
#        (( count == 2 )) && PPID=$value
#        if (( count == 3 )); then
#            PID=$value
#            break
#        fi
#        (( count += 1 ))
#    done
#    if [[ -n $PID && -n $PPID ]]; then
#        if [[ $PID == 1 ]]; then
#            kill -1 $PPID 2>&1 >/dev/null
#        elif [[ $PID -gt 1 ]]; then
#            kill -1 $PID 2>&1 >/dev/null
#        fi
#    fi

注意最后一个顶行的fi不要注释,否则会报错的哦。

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

0

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

X社区推广