I have problems in using nohup to run top command in the background. First, I run it locally, as
nohup top &
it complains in nohup.out
with text top: failed to get tty
. My ultimate goal is to run top on remote machine, like
nohup ssh -t user@hostname top &
currently, the above command also fails with
Pseudo-terminal will not be allocated because stdin is not a terminal.^M
TERM environment variable not set
Any ideas?
PS: I run this command to ping machineB
from machineA
. machineA
is always alive, but not not always logged in.
Have you tried the -b (batch mode) switch of the top command?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With