系统集成系统维护aix 6

AIX 健康检查脚本

各位 大神,请解释一下脚本都是什么意思? RC=0unset resultresult=`uptime | grep days | awk '{print $3}'`if [ ! -z "${result}" ] ; then        if [ ${result} -gt 8000 ] ; then            ...显示全部
各位 大神,请解释一下脚本都是什么意思?



RC=0

unset result
result=`uptime | grep days | awk '{print $3}'`
if [ ! -z "${result}" ] ; then
        if [ ${result} -gt 8000 ] ; then
                echo "System is up over 8000 days; this is a sign of a corrupt /etc/utmp file."
                RC=1
        fi
fi

if [ ${RC} -eq 0 ] ; then
        result=`who -r`
        if [ -z "${result}" ] ; then
                echo "Unable to determine run-level with the who -r command."
                echo "This is a sign of a corrupt /etc/utmp file."
                RC=1
        fi
fi

return ${RC}收起
参与15

查看其它 13 个回答xindahai的回答

xindahaixindahai系统运维工程师耀泰明德
回复 12# hsluckyboys


    大人 根据多年跟随你破案的经验。这个脚本分析不全面。。。。。。
系统集成 · 2012-11-19
浏览1454

回答者

xindahai
系统运维工程师耀泰明德
擅长领域: 服务器数据库AIX

xindahai 最近回答过的问题

回答状态

  • 发布时间:2012-11-19
  • 关注会员:1 人
  • 回答浏览:1454
  • X社区推广