Chinaunix首页 | 论坛 | 博客
  • 博客访问: 198675
  • 博文数量: 42
  • 博客积分: 2520
  • 博客等级: 少校
  • 技术积分: 392
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-26 16:41
文章分类

全部博文(42)

文章存档

2010年(4)

2009年(38)

我的朋友

分类: LINUX

2009-03-12 21:06:52

通过其他程序或脚本在非交互式模式下调用top命令,经常会出现:
   top: failed tty get 错误

解决办法:加个-b 选项皆可

-b : Batch mode operation
   Starts  top  in  Batch mode, which could be useful for sending output from top to other programs or to a file.  In this mode, top will not accept input and runs until the iterations limit youve set with the -n command-line option or until killed.

例如执行:top -bn 1

阅读(8150) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~