执行 nohup top &
nohup.out 显示

top: failed tty get

+++++++++++++++++

top后台执行显示:top: failed tty get 错误 2009-03-12 21:06:52

分类: LINUX

通过其他程序或脚本在非交互式模式下调用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

这样就可以了:

nohup top -b &

相关文章:

  • 2021-07-05
  • 2021-06-10
  • 2021-09-01
  • 2021-09-10
  • 2021-12-02
  • 2021-12-16
  • 2022-12-23
猜你喜欢
  • 2021-09-16
  • 2021-07-13
  • 2021-10-16
  • 2021-10-30
  • 2021-05-14
  • 2022-12-23
  • 2021-07-22
相关资源
相似解决方案