Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 13 down vote accepted

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.

share|improve this answer
Thanks, it works! – SIGSEGV Jul 19 '12 at 14:55
@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! – Sotapanna 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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