How can I interpret the “controlling terminal” code of ps output?
Clash 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.
ps
add a comment |
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.
ps
Why are you calling that “controlling terminal”? Where did you see this term? The “controlling terminal” column doesn't contain things likeSs+
, it contains things liketty42
.
– Gilles
Feb 9 '17 at 23:49
add a comment |
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.
ps
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
ps
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 likeSs+
, it contains things liketty42
.
– Gilles
Feb 9 '17 at 23:49
add a comment |
Why are you calling that “controlling terminal”? Where did you see this term? The “controlling terminal” column doesn't contain things likeSs+
, it contains things liketty42
.
– 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
add a comment |
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
add a comment |
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.
add a comment |
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
add a comment |
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
add a comment |
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
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
answered Feb 9 '17 at 15:43
user4556274
5,32811224
5,32811224
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 18 at 11:45
Tony Barganski
1412
1412
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 liketty42
.– Gilles
Feb 9 '17 at 23:49