I have to run top command on one computer being on another. My targeted PC has IP

I was trying to do it: ssh top

But I got this result: top: tcgetattr() failed: Invalid argument

Could anybody help me with this issue?

System info: Linux iRP-C-09 2.4.18-timesys-4.0.642

Top version: 2.0.7


top is a full screen interactive console application. It requires a tty to run. Try ssh -t or ssh -tt to force pseudo-tty allocation.

  • 4
    @AlexWih, then you probably should mark this as the correct answer, rather than the off topic one. – psusi Jul 19 '12 at 18:51
  • Sure, I did it. – SIGSEGV Jul 20 '12 at 9:58
  • thank you! that fixed me an issue which kept me busy way too long! – Dennis Winter Sep 9 '14 at 22:42

Little bit off-topic:

If you need more (and better looking) output, you could also try atop. You can download it here. Very useful to debug performance issues. It can also log system performance, so you can "rewind and playback" a problem.


If you do not want to see interactive display, you could let it output only one-snapshot then you no longer need "ssh -t" option:

top -n 1 -b

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.