list processes running inside of screen (manager with with VT100/ANSI terminal emulation) Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election Results Why I closed the “Why is Kali so hard” questionSharing a terminal with multiple users (with screen or otherwise)How to stop background processes started with screenscreen manager with VT100/ANSI terminal emulationlist graphical processes from terminalFind all idle screensList of running processesScrolling with mouse wheel inside screenGet list of processes that were forked off my currently running process?How to list all NEW running processes?Get a list of children process ids (PIDs) running in a screen session
How to find all the available tools in macOS terminal?
What are the motives behind Cersei's orders given to Bronn?
ListPlot join points by nearest neighbor rather than order
Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?
Output the ŋarâþ crîþ alphabet song without using (m)any letters
Is it true that "carbohydrates are of no use for the basal metabolic need"?
What does the "x" in "x86" represent?
Gastric acid as a weapon
Why are there no cargo aircraft with "flying wing" design?
How much radiation do nuclear physics experiments expose researchers to nowadays?
Can inflation occur in a positive-sum game currency system such as the Stack Exchange reputation system?
How does a Death Domain cleric's Touch of Death feature work with Touch-range spells delivered by familiars?
Single word antonym of "flightless"
Dominant seventh chord in the major scale contains diminished triad of the seventh?
Diagram with tikz
The logistics of corpse disposal
How widely used is the term Treppenwitz? Is it something that most Germans know?
Is a manifold-with-boundary with given interior and non-empty boundary essentially unique?
Antler Helmet: Can it work?
Is the address of a local variable a constexpr?
Bonus calculation: Am I making a mountain out of a molehill?
3 doors, three guards, one stone
How can I make names more distinctive without making them longer?
Did Xerox really develop the first LAN?
list processes running inside of screen (manager with with VT100/ANSI terminal emulation)
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionSharing a terminal with multiple users (with screen or otherwise)How to stop background processes started with screenscreen manager with VT100/ANSI terminal emulationlist graphical processes from terminalFind all idle screensList of running processesScrolling with mouse wheel inside screenGet list of processes that were forked off my currently running process?How to list all NEW running processes?Get a list of children process ids (PIDs) running in a screen session
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have an application that during installation runs a bunch of processes via screen, so I can see those if attached to the screen, however I don't see those via "ps -ef" or "ps auxww". How can I list all the processes running inside of screen ?
Thanks.
process gnu-screen
add a comment |
I have an application that during installation runs a bunch of processes via screen, so I can see those if attached to the screen, however I don't see those via "ps -ef" or "ps auxww". How can I list all the processes running inside of screen ?
Thanks.
process gnu-screen
add a comment |
I have an application that during installation runs a bunch of processes via screen, so I can see those if attached to the screen, however I don't see those via "ps -ef" or "ps auxww". How can I list all the processes running inside of screen ?
Thanks.
process gnu-screen
I have an application that during installation runs a bunch of processes via screen, so I can see those if attached to the screen, however I don't see those via "ps -ef" or "ps auxww". How can I list all the processes running inside of screen ?
Thanks.
process gnu-screen
process gnu-screen
asked Dec 9 '14 at 17:08
MarkMark
5082825
5082825
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
start cmd: # screen -ls
There is a screen on:
24525.pts-0.syscontrol (Attached)
start cmd: # pstree -p 24525
screen(24525)─┬─bash(10773)───su(10790)───bash(10791)
├─bash(10863)───pstree(11099)
└─bash(24526)
add a comment |
Using pstree
greatly simplifies the problem, but some clarification might help.
When you start screen
, it runs two processes, screen
(the parent) and SCREEN
(the child):
- The
-ls
option ofscreen
shows the session identifier with the child's process-id. - You should list the parent process-id for consistency.
- It helps to show the argument list;
pstree
can do this. - You could have multiple screen sessions on the same machine.
Tying these together calls for a script. Here is an example:
# $Id: ps-screen,v 1.1 2016/10/23 22:19:56 tom Exp $
# http://unix.stackexchange.com/questions/172347/list-processes-running-inside-of-screen-manager-with-with-vt100-ansi-terminal-e
screen -ls | awk '/[0-9]+./print;' | while read session
do
child=$(echo "$session" | awk 'sub("..*","",$1); print $1;')
printf '%sn' "$session"
parent=$(ps -p $child -o ppid=)
pstree -p -a $parent
done
and example output, for two sessions:
~ (101) ps-screen
38142.pts-1.vmw-debian7-64 (10/23/2016 06:20:28 PM) (Attached)
screen,38141
└─screen,38142
└─tcsh,38143
└─ps-screen,38161 /users/tom/bin/ps-screen
└─ps-screen,38164 /users/tom/bin/ps-screen
└─pstree,38169 -p -a 38141
3975.pts-0.vmw-debian7-64 (10/23/2016 06:15:28 AM) (Attached)
screen,3974
└─screen,3975
├─tcsh,5002
│ └─ded,19926 /usr/build//ncurses
│ └─vile,24647 /usr/build/ncurses/ncurses-6.0-20161029/NEWS
└─tcsh,36551
└─ded,36569 /tmp
Further reading:
pstree - display a tree of processes (Linux)
pstree - display a tree of processes (FreeBSD)
add a comment |
Retrieve tty(pty) from screen -ls
and then, ps -t ttyname
or ps t ttyname
will display process list associated with ttyname.
ps(1) manpage on Ubuntu
screen(1) manpage on Ubuntu
add a comment |
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
);
);
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%2f172347%2flist-processes-running-inside-of-screen-manager-with-with-vt100-ansi-terminal-e%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
start cmd: # screen -ls
There is a screen on:
24525.pts-0.syscontrol (Attached)
start cmd: # pstree -p 24525
screen(24525)─┬─bash(10773)───su(10790)───bash(10791)
├─bash(10863)───pstree(11099)
└─bash(24526)
add a comment |
start cmd: # screen -ls
There is a screen on:
24525.pts-0.syscontrol (Attached)
start cmd: # pstree -p 24525
screen(24525)─┬─bash(10773)───su(10790)───bash(10791)
├─bash(10863)───pstree(11099)
└─bash(24526)
add a comment |
start cmd: # screen -ls
There is a screen on:
24525.pts-0.syscontrol (Attached)
start cmd: # pstree -p 24525
screen(24525)─┬─bash(10773)───su(10790)───bash(10791)
├─bash(10863)───pstree(11099)
└─bash(24526)
start cmd: # screen -ls
There is a screen on:
24525.pts-0.syscontrol (Attached)
start cmd: # pstree -p 24525
screen(24525)─┬─bash(10773)───su(10790)───bash(10791)
├─bash(10863)───pstree(11099)
└─bash(24526)
answered Dec 9 '14 at 18:27
Hauke LagingHauke Laging
57.9k1288137
57.9k1288137
add a comment |
add a comment |
Using pstree
greatly simplifies the problem, but some clarification might help.
When you start screen
, it runs two processes, screen
(the parent) and SCREEN
(the child):
- The
-ls
option ofscreen
shows the session identifier with the child's process-id. - You should list the parent process-id for consistency.
- It helps to show the argument list;
pstree
can do this. - You could have multiple screen sessions on the same machine.
Tying these together calls for a script. Here is an example:
# $Id: ps-screen,v 1.1 2016/10/23 22:19:56 tom Exp $
# http://unix.stackexchange.com/questions/172347/list-processes-running-inside-of-screen-manager-with-with-vt100-ansi-terminal-e
screen -ls | awk '/[0-9]+./print;' | while read session
do
child=$(echo "$session" | awk 'sub("..*","",$1); print $1;')
printf '%sn' "$session"
parent=$(ps -p $child -o ppid=)
pstree -p -a $parent
done
and example output, for two sessions:
~ (101) ps-screen
38142.pts-1.vmw-debian7-64 (10/23/2016 06:20:28 PM) (Attached)
screen,38141
└─screen,38142
└─tcsh,38143
└─ps-screen,38161 /users/tom/bin/ps-screen
└─ps-screen,38164 /users/tom/bin/ps-screen
└─pstree,38169 -p -a 38141
3975.pts-0.vmw-debian7-64 (10/23/2016 06:15:28 AM) (Attached)
screen,3974
└─screen,3975
├─tcsh,5002
│ └─ded,19926 /usr/build//ncurses
│ └─vile,24647 /usr/build/ncurses/ncurses-6.0-20161029/NEWS
└─tcsh,36551
└─ded,36569 /tmp
Further reading:
pstree - display a tree of processes (Linux)
pstree - display a tree of processes (FreeBSD)
add a comment |
Using pstree
greatly simplifies the problem, but some clarification might help.
When you start screen
, it runs two processes, screen
(the parent) and SCREEN
(the child):
- The
-ls
option ofscreen
shows the session identifier with the child's process-id. - You should list the parent process-id for consistency.
- It helps to show the argument list;
pstree
can do this. - You could have multiple screen sessions on the same machine.
Tying these together calls for a script. Here is an example:
# $Id: ps-screen,v 1.1 2016/10/23 22:19:56 tom Exp $
# http://unix.stackexchange.com/questions/172347/list-processes-running-inside-of-screen-manager-with-with-vt100-ansi-terminal-e
screen -ls | awk '/[0-9]+./print;' | while read session
do
child=$(echo "$session" | awk 'sub("..*","",$1); print $1;')
printf '%sn' "$session"
parent=$(ps -p $child -o ppid=)
pstree -p -a $parent
done
and example output, for two sessions:
~ (101) ps-screen
38142.pts-1.vmw-debian7-64 (10/23/2016 06:20:28 PM) (Attached)
screen,38141
└─screen,38142
└─tcsh,38143
└─ps-screen,38161 /users/tom/bin/ps-screen
└─ps-screen,38164 /users/tom/bin/ps-screen
└─pstree,38169 -p -a 38141
3975.pts-0.vmw-debian7-64 (10/23/2016 06:15:28 AM) (Attached)
screen,3974
└─screen,3975
├─tcsh,5002
│ └─ded,19926 /usr/build//ncurses
│ └─vile,24647 /usr/build/ncurses/ncurses-6.0-20161029/NEWS
└─tcsh,36551
└─ded,36569 /tmp
Further reading:
pstree - display a tree of processes (Linux)
pstree - display a tree of processes (FreeBSD)
add a comment |
Using pstree
greatly simplifies the problem, but some clarification might help.
When you start screen
, it runs two processes, screen
(the parent) and SCREEN
(the child):
- The
-ls
option ofscreen
shows the session identifier with the child's process-id. - You should list the parent process-id for consistency.
- It helps to show the argument list;
pstree
can do this. - You could have multiple screen sessions on the same machine.
Tying these together calls for a script. Here is an example:
# $Id: ps-screen,v 1.1 2016/10/23 22:19:56 tom Exp $
# http://unix.stackexchange.com/questions/172347/list-processes-running-inside-of-screen-manager-with-with-vt100-ansi-terminal-e
screen -ls | awk '/[0-9]+./print;' | while read session
do
child=$(echo "$session" | awk 'sub("..*","",$1); print $1;')
printf '%sn' "$session"
parent=$(ps -p $child -o ppid=)
pstree -p -a $parent
done
and example output, for two sessions:
~ (101) ps-screen
38142.pts-1.vmw-debian7-64 (10/23/2016 06:20:28 PM) (Attached)
screen,38141
└─screen,38142
└─tcsh,38143
└─ps-screen,38161 /users/tom/bin/ps-screen
└─ps-screen,38164 /users/tom/bin/ps-screen
└─pstree,38169 -p -a 38141
3975.pts-0.vmw-debian7-64 (10/23/2016 06:15:28 AM) (Attached)
screen,3974
└─screen,3975
├─tcsh,5002
│ └─ded,19926 /usr/build//ncurses
│ └─vile,24647 /usr/build/ncurses/ncurses-6.0-20161029/NEWS
└─tcsh,36551
└─ded,36569 /tmp
Further reading:
pstree - display a tree of processes (Linux)
pstree - display a tree of processes (FreeBSD)
Using pstree
greatly simplifies the problem, but some clarification might help.
When you start screen
, it runs two processes, screen
(the parent) and SCREEN
(the child):
- The
-ls
option ofscreen
shows the session identifier with the child's process-id. - You should list the parent process-id for consistency.
- It helps to show the argument list;
pstree
can do this. - You could have multiple screen sessions on the same machine.
Tying these together calls for a script. Here is an example:
# $Id: ps-screen,v 1.1 2016/10/23 22:19:56 tom Exp $
# http://unix.stackexchange.com/questions/172347/list-processes-running-inside-of-screen-manager-with-with-vt100-ansi-terminal-e
screen -ls | awk '/[0-9]+./print;' | while read session
do
child=$(echo "$session" | awk 'sub("..*","",$1); print $1;')
printf '%sn' "$session"
parent=$(ps -p $child -o ppid=)
pstree -p -a $parent
done
and example output, for two sessions:
~ (101) ps-screen
38142.pts-1.vmw-debian7-64 (10/23/2016 06:20:28 PM) (Attached)
screen,38141
└─screen,38142
└─tcsh,38143
└─ps-screen,38161 /users/tom/bin/ps-screen
└─ps-screen,38164 /users/tom/bin/ps-screen
└─pstree,38169 -p -a 38141
3975.pts-0.vmw-debian7-64 (10/23/2016 06:15:28 AM) (Attached)
screen,3974
└─screen,3975
├─tcsh,5002
│ └─ded,19926 /usr/build//ncurses
│ └─vile,24647 /usr/build/ncurses/ncurses-6.0-20161029/NEWS
└─tcsh,36551
└─ded,36569 /tmp
Further reading:
pstree - display a tree of processes (Linux)
pstree - display a tree of processes (FreeBSD)
answered Oct 23 '16 at 22:25
Thomas DickeyThomas Dickey
54.3k5106181
54.3k5106181
add a comment |
add a comment |
Retrieve tty(pty) from screen -ls
and then, ps -t ttyname
or ps t ttyname
will display process list associated with ttyname.
ps(1) manpage on Ubuntu
screen(1) manpage on Ubuntu
add a comment |
Retrieve tty(pty) from screen -ls
and then, ps -t ttyname
or ps t ttyname
will display process list associated with ttyname.
ps(1) manpage on Ubuntu
screen(1) manpage on Ubuntu
add a comment |
Retrieve tty(pty) from screen -ls
and then, ps -t ttyname
or ps t ttyname
will display process list associated with ttyname.
ps(1) manpage on Ubuntu
screen(1) manpage on Ubuntu
Retrieve tty(pty) from screen -ls
and then, ps -t ttyname
or ps t ttyname
will display process list associated with ttyname.
ps(1) manpage on Ubuntu
screen(1) manpage on Ubuntu
answered Nov 7 '18 at 2:43
minishminish
22626
22626
add a comment |
add a comment |
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.
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%2f172347%2flist-processes-running-inside-of-screen-manager-with-with-vt100-ansi-terminal-e%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