title: Use "nohup" to run "top" command in background
body: <p>I have problems in using nohup to run top command in the background. First, I run it locally, as</p>
  
  <pre><code>nohup top &amp;
  </code></pre>
  
  <p>it complains in <code>nohup.out</code> with text <code>top: failed to get tty</code>. My ultimate goal is to run top on remote machine, like </p>
  
  <pre><code>nohup ssh -t user@hostname top &amp;
  </code></pre>
  
  <p>currently, the above command also fails with </p>
  
  <pre><code>Pseudo-terminal will not be allocated because stdin is not a terminal.^M 
  TERM environment variable not set
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>PS: I run this command to ping <code>machineB</code> from <code>machineA</code>. <code>machineA</code> is always alive, but not not always logged in.</p>