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

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

在AIX 4.x如何清除挂起的tty

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

领测软件测试网

[sh85_1][/]# kill -9 40008
[sh85_1][/]# ps -ef|grep 40008
    root  40008      1 113   Aug 30      - 7921:58 dd if=/dev/raaalv of=/dev/null bs=1024k
    root 153872 145004   0 11:29:26  pts/7  0:00 grep 40008

[sh85_1][/]# who -d
   .            .       Jun 12 17:45    0:08     12128 id=load64b term=0 exit=0
   .            .       Jun 12 17:45    0:08     12384 id=rc      term=0 exit=0
   .            .       Jun 12 17:45    0:08     12386 id=fbcheck term=0 exit=0
   .            .       Jun 12 17:45    0:08     12646 id=r.netw  term=0 exit=0
   .            .       Jun 12 17:45    0:08     12648 id=cnsview term=0 exit=0
   .            .       Jun 12 17:45    0:08     13202 id=rctcpip term=0 exit=0
   .            .       Jun 12 17:45    0:08     13204 id=adsmsme term=0 exit=0
   .            .       Jun 12 17:46    0:08     16780 id=rcnfs   term=0 exit=0
   .            .       Jun 12 17:46    0:08     20128 id=piobe   term=0 exit=0
   .            .       Jun 12 17:46    0:08     20130 id=qdaemon term=0 exit=0
   .            .       Jun 12 17:46    0:08     20132 id=writesr term=0 exit=0
   .            .       Jun 12 17:46    0:08     20904 id=logsymp term=0 exit=0
   .            .       Jun 12 17:46    0:08     21156 id=pmd     term=0 exit=0
   .            .       Jun 12 17:46    0:08     21158 id=httpdli term=0 exit=0
   .            .       Jun 12 17:46    0:08     21418 id=diagd   term=0 exit=0
   .            .       Jun 12 17:46    0:08     21930 id=dt      term=0 exit=0
   .            .       Jun 12 17:46    0:08     21932 id=l2      term=0 exit=0
   .            .       Jun 12 17:46    0:08     22710 id=naviage term=0 exit=0
   .            .       Jun 12 17:46    0:08     23484 id=i4ls    term=0 exit=0
   .            .       Jun 12 17:46    0:08     23486 id=orapw   term=0 exit=0
   .            .       Jun 12 17:46    0:08     23488 id=imnss   term=0 exit=0
   .            .       Jun 12 17:46    0:08     22524 id=imqss   term=0 exit=0
   .        pts/0       Aug 30 23:05    old     158946 id=pts/0   term=1 exit=0
   .        pts/2       Jul 20 10:07    old     107244 id=pts/2   term=1 exit=0
   .        pts/3       Jul 20 14:04    old     109032 id=pts/3   term=1 exit=0
   .        pts/4       Sep 02 09:42    old     124522 id=pts/4   term=1 exit=0
   .        pts/5       Sep 05 11:27    0:06     28702 id=pts/5   term=0 exit=1
   .        pts/6       Aug 30 22:55    old     130536 id=pts/6   term=0 exit=0
   .        pts/8       Aug 03 16:21    old     126202 id=pts/8   term=1 exit=0
   .        pts/9       Sep 02 08:16    old      55274 id=pts/9   term=0 exit=0
   .        dtremote    Aug 05 15:29    old      70098 id=0.49.25 term=-1 exit=0

在AIX 4.x如何清除挂起的tty(-)

环境  RS6000, AIX 4.x
问题  在AIX 4.x如何清除挂起的tty
解答 为了说明方便,下面的例子假设挂起的tty端口为tty0.

1.确定当前挂起的tty正在操作的进程:

ps -ef | grep tty0

该命令假设返回内容如下:

root 12345 1 0 Aug 29 0 /path/program_name

进程ID (PID) 是"12345". 杀掉该进程:

kill -9 12345

再次运行ps -ef | grep tty0 命令去查看该进程是否被杀掉。

不要使用“-9”的选项去杀掉slattach进程,因为它可能导致AIX操作系统挂起。
注意:如果进程是“getty”, 使用下面命令去杀掉进程:
pdisable tty0
如果上面命令不能成功的杀掉进程,而tty仍然是挂起的,可以使用第二步。


2. 执行下面的命令:

fuser -k /dev/tty0

该命令将杀掉运行在此端口的所有进程,并且显示其PID (进程 ID).
如果上面命令不能成功的杀掉进程,而tty仍然是挂起的,可以使用第三步。


3. 在被挂起的终端的键盘上,键入“Ctrl+Q”. 如果tty仍然挂起,使用第四步。


4. 物理的断开连接端口的设备(连线). 在某些情况下可以释放端口.

注意:前面的一些命令也许不会生效并且报”设备忙“的错误。这是由于一些进程正运行在tty上。如果上面的步骤仍不能释放挂起的tty,最后可以通过重起AIX释放内核去清除此进程。

延伸阅读

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


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

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