系统集成系统维护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 个回答xiaoyu19861016的回答

xiaoyu19861016xiaoyu19861016软件开发工程师青岛科技公司
高手   不过这脚本用在哪方面
互联网服务 · 2012-10-12
浏览1412

回答者

xiaoyu19861016
软件开发工程师青岛科技公司
擅长领域: 存储服务器AIX

xiaoyu19861016 最近回答过的问题

回答状态

  • 发布时间:2012-10-12
  • 关注会员:1 人
  • 回答浏览:1412
  • X社区推广