免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 21117 | 回复: 2
打印 上一主题 下一主题

ttytype: couldn't open /dev/tty for reading stty: : Not a typewriter [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-07-19 17:27 |只看该作者 |倒序浏览
安装oracle 集群日志总是显示:
ttytype: couldn't open /dev/tty for reading
stty: : Not a typewriter

请问这个错误对应的脚本是哪一段呢: 感谢!!!!

function monitor_listener
{
su - oracle -c "${ORACLE_HOME}/bin/lsnrctl status
${ORACLE_LISTENER_NAME}" > /dev/null
if [ $? = 0 ]
then
MONITOR_PROCESSES_PID=`ps -fu oracle | grep tnslsnr | awk '{ print $2 }'`
print "Monitored process = tnslsnr, pid = ${MONITOR_PROCESSES_PID}" >> ${LOG_FILE}
return 0
fi
su - oracle -c "${ORACLE_HOME}/bin/lsnrctl start
${ORACLE_LISTENER_NAME}" > /dev/null
if [ $? = 0 ]
then
MONITOR_PROCESSES_PID=`ps -fu oracle | grep tnslsnr | awk '{ print $2 }'`
print "Monitored process = tnslsnr, pid = ${MONITOR_PROCESSES_PID}" >> ${LOG_FILE}
print "\n *** listener has restarted. ***" >> ${LOG_FILE}
return 0
fi
print "\n *** listener has failed. Aborting Oracle. ***" >> ${LOG_FILE}
return 1
}
function monitor_processes
{
typeset -i n=0
for i in ${MONITOR_PROCESSES[@]}
do
MONITOR_PROCESSES_PID[$n]=`ps -fu oracle | awk '/'${i}$'/ { print $2 }'`
#JAGad06432
print "Monitored process = ${i}, pid = ${MONITOR_PROCESSES_PID[$n]}"
if [[ ${MONITOR_PROCESSES_PID[$n]} = "" ]]
then
print "\n\n"
ps -ef
print "\n *** ${i} has failed at startup time. Aborting Oracle.***"
set -m
nohup ${0} fault & # The script calls itself with the fault option.
set +m
sleep 999999
fi
(( n = n + 1 ))
done
sleep ${MONITOR_INTERVAL}
while true
do
for i in ${MONITOR_PROCESSES_PID[@]}
do
kill -s 0 ${i} > /dev/null
if [[ $? != 0 ]]
then
print "\n\n"
ps -ef
print "\n *** ${i} has failed. Aborting Oracle. ***"
set -m
nohup ${0} fault & # The script calls itself with the fault
option.
set +m
sleep 999999
fi
done
monitor_listener
if [ $? = 1 ]
then
print "\n Listener has failed. Aborting Oracle. ***"
set -m
nohup ${0} fault & # The script calls itself with the fault
option.
set +m
sleep 999999
fi
sleep ${MONITOR_INTERVAL}
done
}
function monitor_processes2
{
while true
do
su oracle -c "${ORACLE_HOME}/bin/sqlplus corpring/corpring" <<EOF
WHENEVER SQLERROR EXIT 1
select 'success' from dual;
exit
EOF
if [[ $? != 0 ]]
then
print "Connect to oracle failed."
set -m
nohup ${0} fault & # The script calls itself with the fault option.
set +m
sleep 999999
else
print "Connected to oracle."
fi
sleep ${MONITOR2_INTERVAL}
done
}
###############################################################################
# Function: halt_package
#
# Because there is no move command in MC/Serviceguard, the package must first
# be halted, disabled from running on the host, and then enabled to run in the
# cluster.
###############################################################################

function halt_package
{
cmhaltpkg ${PACKAGE_NAME}
cmmodpkg -d -n ${HOST} ${PACKAGE_NAME}
sleep 1
cmmodpkg -e ${PACKAGE_NAME}
}
###############################################################################
# MAIN
#
# Check the command-line option and take the appropriate action.
###############################################################################
print "\n *** $0 called with $1 argument. ***\n"
case $1 in
fault)
halt_package
;;
kill)
kill_hung_processes
;;
monitor)
monitor_processes
;;
monitor2)
monitor_processes2
;;
start)
print "\n \"${HOST}\": Starting Oracle SESSION $SID_NAME at ${DATE}"
oracle_run_cmds
;;
halt)
print "\n \"${HOST}\": Aborting Oracle SESSION $SID_NAME at ${DATE}"

oracle_abort_cmds
;;
shutdown)
print "\n \"${HOST}\": Shutting down Oracle SESSION $SID_NAME at ${DATE} "
oracle_shutdown_cmds
;;
*)
print "Usage: ${0} [ shutdown | halt | start | monitor ]"
;;
esac

论坛徽章:
0
2 [报告]
发表于 2011-07-20 10:51 |只看该作者
这是什么.....

论坛徽章:
0
3 [报告]
发表于 2014-09-18 13:45 |只看该作者
/etc/profile以及.profile里的里注销掉有关stty和ttytype的环境变量即可!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP