バックグラウンドでトップコマンドを実行するために nohup を使用する際に問題があります。まず、ローカルで実行します。
nohup top &
nohup.out
テキストで文句を言いますtop: failed to get tty
。私の最終的な目標は、次のようにリモートマシンでトップを実行することです
nohup ssh -t user@hostname top &
現在、上記のコマンドも失敗します
Pseudo-terminal will not be allocated because stdin is not a terminal.^M
TERM environment variable not set
何か案は?
PS: から ping を実行するには、このコマンドを実行しmachineB
ますmachineA
。machineA
は常に生きていますが、常にログインしているわけではありません。