How to properly run “top” command through SSH?












7














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



























    7














    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

























      7












      7








      7


      3





      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













      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







      linux ssh terminal top






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 19 '12 at 14:45









      SIGSEGVSIGSEGV

      200237




      200237






















          3 Answers
          3






          active

          oldest

          votes


















          18














          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

















          • 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!
            – stpn108
            Sep 9 '14 at 22:42



















          1














          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





























            0














            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




            share








            New contributor




            fchen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.


















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "106"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f43496%2fhow-to-properly-run-top-command-through-ssh%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              18














              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

















              • 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!
                – stpn108
                Sep 9 '14 at 22:42
















              18














              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

















              • 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!
                – stpn108
                Sep 9 '14 at 22:42














              18












              18








              18






              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












              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












              share|improve this answer



              share|improve this answer










              answered Jul 19 '12 at 14:49









              jw013jw013

              36k699125




              36k699125








              • 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!
                – stpn108
                Sep 9 '14 at 22:42














              • 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!
                – stpn108
                Sep 9 '14 at 22:42








              4




              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




              @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




              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!
              – stpn108
              Sep 9 '14 at 22:42




              thank you! that fixed me an issue which kept me busy way too long!
              – stpn108
              Sep 9 '14 at 22:42













              1














              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


























                1














                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
























                  1












                  1








                  1






                  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












                  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












                  share|improve this answer



                  share|improve this answer










                  answered Jul 19 '12 at 15:45









                  MultimhoMultimho

                  1311




                  1311























                      0














                      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




                      share








                      New contributor




                      fchen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.























                        0














                        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




                        share








                        New contributor




                        fchen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.





















                          0












                          0








                          0






                          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




                          share








                          New contributor




                          fchen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          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





                          share








                          New contributor




                          fchen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.








                          share


                          share






                          New contributor




                          fchen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered 6 mins ago









                          fchenfchen

                          1012




                          1012




                          New contributor




                          fchen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          fchen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          fchen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Unix & Linux Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f43496%2fhow-to-properly-run-top-command-through-ssh%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Accessing regular linux commands in Huawei's Dopra Linux

                              Can't connect RFCOMM socket: Host is down

                              Kernel panic - not syncing: Fatal Exception in Interrupt