How can I interpret the “controlling terminal” code of ps output?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












The controlling terminal output of ps lists things "Ss+". How can I determine what these codes mean? I tried looking through the ps manual, which is a 30-page document, I found no explanation.










share|improve this question





















  • Why are you calling that “controlling terminal”? Where did you see this term? The “controlling terminal” column doesn't contain things like Ss+, it contains things like tty42.
    – Gilles
    Feb 9 '17 at 23:49














up vote
1
down vote

favorite












The controlling terminal output of ps lists things "Ss+". How can I determine what these codes mean? I tried looking through the ps manual, which is a 30-page document, I found no explanation.










share|improve this question





















  • Why are you calling that “controlling terminal”? Where did you see this term? The “controlling terminal” column doesn't contain things like Ss+, it contains things like tty42.
    – Gilles
    Feb 9 '17 at 23:49












up vote
1
down vote

favorite









up vote
1
down vote

favorite











The controlling terminal output of ps lists things "Ss+". How can I determine what these codes mean? I tried looking through the ps manual, which is a 30-page document, I found no explanation.










share|improve this question













The controlling terminal output of ps lists things "Ss+". How can I determine what these codes mean? I tried looking through the ps manual, which is a 30-page document, I found no explanation.







ps






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 9 '17 at 14:44









Tyler Durden

1,50041849




1,50041849











  • Why are you calling that “controlling terminal”? Where did you see this term? The “controlling terminal” column doesn't contain things like Ss+, it contains things like tty42.
    – Gilles
    Feb 9 '17 at 23:49
















  • Why are you calling that “controlling terminal”? Where did you see this term? The “controlling terminal” column doesn't contain things like Ss+, it contains things like tty42.
    – Gilles
    Feb 9 '17 at 23:49















Why are you calling that “controlling terminal”? Where did you see this term? The “controlling terminal” column doesn't contain things like Ss+, it contains things like tty42.
– Gilles
Feb 9 '17 at 23:49




Why are you calling that “controlling terminal”? Where did you see this term? The “controlling terminal” column doesn't contain things like Ss+, it contains things like tty42.
– Gilles
Feb 9 '17 at 23:49










2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










From man ps:



PROCESS STATE CODES
Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to describe the state of a process:

D uninterruptible sleep (usually IO)
R running or runnable (on run queue)
S interruptible sleep (waiting for an event to complete)
T stopped by job control signal
t stopped by debugger during the tracing
W paging (not valid since the 2.6.xx kernel)
X dead (should never be seen)
Z defunct ("zombie") process, terminated but not reaped by its parent

For BSD formats and when the stat keyword is used, additional characters may be displayed:

< high-priority (not nice to other users)
N low-priority (nice to other users)
L has pages locked into memory (for real-time and custom IO)
s is a session leader
l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
+ is in the foreground process group





share|improve this answer



























    up vote
    0
    down vote













    Look for the tt column from ps output and use tty command like so:



    $ps ax |more
    PID TT STAT TIME COMMAND
    1 ?? Ss 4:58.84 /sbin/launchd
    66 ?? Ss 1:05.03 /usr/sbin/syslogd
    67 ?? Ss 0:21.62 /usr/libexec/UserEventAgent (System)


    $ps ax |grep bash
    81939 s000 S+ 0:00.09 -bash
    82152 s001 S 0:00.04 -bash
    82228 s001 S+ 0:00.00 grep -I bash


    $tty
    /dev/ttys001


    $ps ax |grep offlineimap-load
    82261 s000 S+ 0:00.02 /bin/bash /Users/pbarganski/Documents/bin/offlineimap-load
    82417 s001 R+ 0:00.01 grep -i offlineimap-load


    From the above, tty command tells me which terminal I am currently in - terminal 's000' in this case.



    From the last command, you'll notice that the grep -i command was run from terminal s001, my current terminal window, however, the offlineimap-load script is running from controlling terminal s000 - my first terminal session - which in this case, is simply the first tab terminal in terminal.app.






    share|improve this answer




















      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',
      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%2f343753%2fhow-can-i-interpret-the-controlling-terminal-code-of-ps-output%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      1
      down vote



      accepted










      From man ps:



      PROCESS STATE CODES
      Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to describe the state of a process:

      D uninterruptible sleep (usually IO)
      R running or runnable (on run queue)
      S interruptible sleep (waiting for an event to complete)
      T stopped by job control signal
      t stopped by debugger during the tracing
      W paging (not valid since the 2.6.xx kernel)
      X dead (should never be seen)
      Z defunct ("zombie") process, terminated but not reaped by its parent

      For BSD formats and when the stat keyword is used, additional characters may be displayed:

      < high-priority (not nice to other users)
      N low-priority (nice to other users)
      L has pages locked into memory (for real-time and custom IO)
      s is a session leader
      l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
      + is in the foreground process group





      share|improve this answer
























        up vote
        1
        down vote



        accepted










        From man ps:



        PROCESS STATE CODES
        Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to describe the state of a process:

        D uninterruptible sleep (usually IO)
        R running or runnable (on run queue)
        S interruptible sleep (waiting for an event to complete)
        T stopped by job control signal
        t stopped by debugger during the tracing
        W paging (not valid since the 2.6.xx kernel)
        X dead (should never be seen)
        Z defunct ("zombie") process, terminated but not reaped by its parent

        For BSD formats and when the stat keyword is used, additional characters may be displayed:

        < high-priority (not nice to other users)
        N low-priority (nice to other users)
        L has pages locked into memory (for real-time and custom IO)
        s is a session leader
        l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
        + is in the foreground process group





        share|improve this answer






















          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          From man ps:



          PROCESS STATE CODES
          Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to describe the state of a process:

          D uninterruptible sleep (usually IO)
          R running or runnable (on run queue)
          S interruptible sleep (waiting for an event to complete)
          T stopped by job control signal
          t stopped by debugger during the tracing
          W paging (not valid since the 2.6.xx kernel)
          X dead (should never be seen)
          Z defunct ("zombie") process, terminated but not reaped by its parent

          For BSD formats and when the stat keyword is used, additional characters may be displayed:

          < high-priority (not nice to other users)
          N low-priority (nice to other users)
          L has pages locked into memory (for real-time and custom IO)
          s is a session leader
          l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
          + is in the foreground process group





          share|improve this answer












          From man ps:



          PROCESS STATE CODES
          Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to describe the state of a process:

          D uninterruptible sleep (usually IO)
          R running or runnable (on run queue)
          S interruptible sleep (waiting for an event to complete)
          T stopped by job control signal
          t stopped by debugger during the tracing
          W paging (not valid since the 2.6.xx kernel)
          X dead (should never be seen)
          Z defunct ("zombie") process, terminated but not reaped by its parent

          For BSD formats and when the stat keyword is used, additional characters may be displayed:

          < high-priority (not nice to other users)
          N low-priority (nice to other users)
          L has pages locked into memory (for real-time and custom IO)
          s is a session leader
          l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
          + is in the foreground process group






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 9 '17 at 15:43









          user4556274

          5,32811224




          5,32811224






















              up vote
              0
              down vote













              Look for the tt column from ps output and use tty command like so:



              $ps ax |more
              PID TT STAT TIME COMMAND
              1 ?? Ss 4:58.84 /sbin/launchd
              66 ?? Ss 1:05.03 /usr/sbin/syslogd
              67 ?? Ss 0:21.62 /usr/libexec/UserEventAgent (System)


              $ps ax |grep bash
              81939 s000 S+ 0:00.09 -bash
              82152 s001 S 0:00.04 -bash
              82228 s001 S+ 0:00.00 grep -I bash


              $tty
              /dev/ttys001


              $ps ax |grep offlineimap-load
              82261 s000 S+ 0:00.02 /bin/bash /Users/pbarganski/Documents/bin/offlineimap-load
              82417 s001 R+ 0:00.01 grep -i offlineimap-load


              From the above, tty command tells me which terminal I am currently in - terminal 's000' in this case.



              From the last command, you'll notice that the grep -i command was run from terminal s001, my current terminal window, however, the offlineimap-load script is running from controlling terminal s000 - my first terminal session - which in this case, is simply the first tab terminal in terminal.app.






              share|improve this answer
























                up vote
                0
                down vote













                Look for the tt column from ps output and use tty command like so:



                $ps ax |more
                PID TT STAT TIME COMMAND
                1 ?? Ss 4:58.84 /sbin/launchd
                66 ?? Ss 1:05.03 /usr/sbin/syslogd
                67 ?? Ss 0:21.62 /usr/libexec/UserEventAgent (System)


                $ps ax |grep bash
                81939 s000 S+ 0:00.09 -bash
                82152 s001 S 0:00.04 -bash
                82228 s001 S+ 0:00.00 grep -I bash


                $tty
                /dev/ttys001


                $ps ax |grep offlineimap-load
                82261 s000 S+ 0:00.02 /bin/bash /Users/pbarganski/Documents/bin/offlineimap-load
                82417 s001 R+ 0:00.01 grep -i offlineimap-load


                From the above, tty command tells me which terminal I am currently in - terminal 's000' in this case.



                From the last command, you'll notice that the grep -i command was run from terminal s001, my current terminal window, however, the offlineimap-load script is running from controlling terminal s000 - my first terminal session - which in this case, is simply the first tab terminal in terminal.app.






                share|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Look for the tt column from ps output and use tty command like so:



                  $ps ax |more
                  PID TT STAT TIME COMMAND
                  1 ?? Ss 4:58.84 /sbin/launchd
                  66 ?? Ss 1:05.03 /usr/sbin/syslogd
                  67 ?? Ss 0:21.62 /usr/libexec/UserEventAgent (System)


                  $ps ax |grep bash
                  81939 s000 S+ 0:00.09 -bash
                  82152 s001 S 0:00.04 -bash
                  82228 s001 S+ 0:00.00 grep -I bash


                  $tty
                  /dev/ttys001


                  $ps ax |grep offlineimap-load
                  82261 s000 S+ 0:00.02 /bin/bash /Users/pbarganski/Documents/bin/offlineimap-load
                  82417 s001 R+ 0:00.01 grep -i offlineimap-load


                  From the above, tty command tells me which terminal I am currently in - terminal 's000' in this case.



                  From the last command, you'll notice that the grep -i command was run from terminal s001, my current terminal window, however, the offlineimap-load script is running from controlling terminal s000 - my first terminal session - which in this case, is simply the first tab terminal in terminal.app.






                  share|improve this answer












                  Look for the tt column from ps output and use tty command like so:



                  $ps ax |more
                  PID TT STAT TIME COMMAND
                  1 ?? Ss 4:58.84 /sbin/launchd
                  66 ?? Ss 1:05.03 /usr/sbin/syslogd
                  67 ?? Ss 0:21.62 /usr/libexec/UserEventAgent (System)


                  $ps ax |grep bash
                  81939 s000 S+ 0:00.09 -bash
                  82152 s001 S 0:00.04 -bash
                  82228 s001 S+ 0:00.00 grep -I bash


                  $tty
                  /dev/ttys001


                  $ps ax |grep offlineimap-load
                  82261 s000 S+ 0:00.02 /bin/bash /Users/pbarganski/Documents/bin/offlineimap-load
                  82417 s001 R+ 0:00.01 grep -i offlineimap-load


                  From the above, tty command tells me which terminal I am currently in - terminal 's000' in this case.



                  From the last command, you'll notice that the grep -i command was run from terminal s001, my current terminal window, however, the offlineimap-load script is running from controlling terminal s000 - my first terminal session - which in this case, is simply the first tab terminal in terminal.app.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 18 at 11:45









                  Tony Barganski

                  1412




                  1412



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f343753%2fhow-can-i-interpret-the-controlling-terminal-code-of-ps-output%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

                      How to check contact read email or not when send email to Individual?

                      Displaying single band from multi-band raster using QGIS

                      How many registers does an x86_64 CPU actually have?