Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

I was trying to do it: ssh 192.168.0.81 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

2 Answers 2

up vote 11 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
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! –  Sotapanna Sep 9 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

 
discard

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.