• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

如何防止SUN机器非正常中断.

发布: 2007-6-08 22:43 | 作者: seanhe | 来源: | 查看: 21次 | 进入软件测试论坛讨论

领测软件测试网
前面看了一个贴子,关于讨论非正常进入状态的问题。
对此也深感头痛,查阅了一些资料,特发此贴,希望能对大家有所帮助。

一、发生中断的原因。
1。当终端机器关机时,由于电信号波动的原因,将给终端服务器发送BREAK信号,SUN收到该信号将进入OK状态,系统停止。
2。人为发送BREAK信号,Stop-a
3。其它原因,如RS232接口脱落,键盘拔插,console线拔插等。

详情查询:
Suns usually listen on their RS232 console ports at 9600 bps, or 960 characters per second (8 data + 1 start + 1 stop = 10 bits per character). That's roughly one character per millisecond. So, the transmit line would have to be steadily positive for 3-4 milliseconds for the Sun to think it was a BREAK signal. Suns can accept RS423 (+/- 5V) signals as well as RS232 (+/- 12V) signals. The voltage threshold for an RS423 signal is around 3.5 Volts. 

So, a signal glitch that stays above +3.5 Volts for 4 milliseconds can make the Sun think someone's sending a BREAK signal. If the terminal or terminal server is not careful to clamp its outputs when the power supplies are charging up (power on) or discharging (power off), such a glitch would be easy to generate. 

Under certain conditions of cable capacitance and/or inductance, just unplugging the RS232 cable can also produce a glitch on the Sun's receive pin that looks like a BREAK signal. 

如何防止BREAK信号发送呢?
方法1:
使用电源开关方法。
sun企业级服务器有四组电源开关:关机、开机、症断和安全开关键,当把电源开关拨到安全开关键时,系统将忽略由键盘拔插,RS232脱落、Stop-a 和终端客户所发送过来的BREAK信号。
方法2:
使用补丁。
可从sunsolve.sun.com中查找相应补丁程序解决这个问题。具体可参照 sun infodoc 21258,
solaris2.6使用patch 105924-10或更高版本。solaris2.7使用107589-02 .

方法3:
使用命令方式。
solaris2.6或更高版本:修改/etc/default/kbd,加入KEYBOARD_ABORT=disable 然后用命令kbd -i使系统重新读取/etc/default/kbd文件,这样可以防止键盘拔插问题,或者使用kbd -a enable |kbd -a disable来启动禁止键盘中断禁止功能。

这里面有个脚本可以用来启用键盘中断禁止与启动。
http://www.scsy.de/~mas/nobreak/nobreak-1.02.gz

安装:
gunzip nobreak-1.02.gz
pkgadd -d nobreak-1.02

然后可以运行启动脚本:
/etc/init.d/nobreak start

如果想禁止所有的中断信号的话可在/etc/system文件中加入:
    set abort_enable=0


方法4:
使用外部设备。
A model NUD4273 "non-aborting serial console adapter" ,设备价值$89USD。
请访问http://www.nudata.com/获知详情。

 ximbow 回复于:2003-11-08 16:13:50
好帖

 guchengman 回复于:2003-11-08 18:06:14
自个顶一下.

 rogerw 回复于:2003-11-08 19:47:33
不错,我还一直不明白为什么我的工作站一关机,连接到串口的server就停机呢!

谢谢了

 mmmmn 回复于:2003-11-08 20:11:03
可惜,说了半天,没把最好的方法说出来。。。
abort_enable更是好多机器不可能那么使用的

 随意江湖行 回复于:2003-11-08 20:23:34
好啊!
好长时间不见mmmmmn了!

 guchengman 回复于:2003-11-08 21:23:22
最好的办法就是利用我上面所提供的脚本,
安装后就可以用
/etc/init.d/nobreak start (stop)
来启用和停止键盘防中断功能.

 mmmmn 回复于:2003-11-10 17:18:44
说过了,你把键盘中断功能完全停止了有时候会很麻烦的。
到sunmanager上找找会有更好的方法

 C.Arthur 回复于:2003-11-10 17:24:43
mmmmn赶紧贴个上来吧!

 mmmmn 回复于:2003-11-10 17:25:40
KICK,偶也是要找的!!!
偶懒

 C.Arthur 回复于:2003-11-10 17:29:59
[quote:5202bb6674="mmmmn"]KICK,偶也是要找的!!!
偶懒[/quote:5202bb6674]
不要懒啦,辛苦你一个,幸福千万人,多有价值啊,你就勇敢的去吧,哈哈
在哪里?我也去找找看

 mmmmn 回复于:2003-11-10 17:34:29
sunmanager

 C.Arthur 回复于:2003-11-10 17:37:48
收到

 pegasusw 回复于:2005-06-09 09:54:04
更好的办法是既不让 termianl/terminalserver 关机影响到 server , 又可以在需要时发送 BREAK 以获得 OK prompt.

原文出处:
http://sysunconfig.net/unixtips/alternate_break_sequence.txt

在Netra上没验证该办法可行不可行.哪位试一下吧.

----------------------
Creating an alternate keyboard sequence for the BREAK signal on dumb terminal
-----------------------------------------------------------------------------


The following patches introduce a new option to the kbd command
---------------------------------------------------------------  
Solaris 2.6 patch 105924-10 or greater
Solaris 7   patch 107589-02 or greater
Solaris 8   patch is integrated

  
The patch allows the keyboard sequence of ~^b to be used instead
of the BREAK signal on a dumb terminal console attached to the serial port.  

The "alternate" flag is not discussed by "man kbd".



Here are the instructions to enable the alternate keyboard sequence. 

Step 1.  Install patch 105924-10 on 2.6 and patch 107589-02 on 7.

Step 2.  reboot the machine.  

Step 3.  A root user can now turn on the alternate break sequence with the
         following command:

  #kbd -a alternate

Now the new Break sequence is ~^b.  

Example:
To bring the system to the OK prompt (assuming the console is on the 
serial port) send the following key sequences:

  # <cr>
  # ~^b


The following procedure will also enable the alternate keyboard sequence

Step 1.  Install patch 105924-10 on 2.6 and patch 107589-02 on 2.7.

Step 2.  Modify the /etc/default/kbd file, by removing the # from the entry:

  #KEYBOARD_ABORT=enable

  and changing it to:

  KEYBOARD_ABORT=alternate

Step 3.  reboot

Any user logged in at the dumb console will be able to issue the alternate 
break signal with the following key sequences:

  # <cr>
  # ~^b

NOTE: It is not possible to set an alternate BREAK on Netra systems.

NOTE: On servers with a physical keyswitch, the alternate BREAK does not work
when the key is set to the Secure position.  

NOTE: Solaris 8 does not require a patch for the new kbd option.  
"In Solaris 8, the alternate break key is defined by the driver for the 
serial device (i.e. zs driver). The man page for zs in Solaris 8  says that
the alternate break sequence is "<RETURN> ~ ^B"  
(carriage return - tilde - control B)."

 pegasusw 回复于:2005-06-09 09:58:20
根据 http://www.sunhelp.org/unix-sysadmin-resources/sysadmin-faq-sun 的说法, 在输入BREAK序列 <回车> ~ ^B 时, 字符输入的时间间隔应大于 0.5 秒, 且应在5秒内全部输入完.

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网