I have several screen sessions, each one of them is running one java application.
For example, I have these 3 screen sessions :
7361.ARM48 (Detached)
7397.ROP90 (Detached)
7314.ARM22 (Detached)
And this is the output of ps -A
7314 ? 00:00:00 screen
7329 pts/1 00:00:16 java
7361 ? 00:00:00 screen
7375 pts/2 00:00:02 java
7397 ? 00:00:00 screen
7411 pts/3 00:00:02 java
Is there any way to reliably detect whether each screen session is running their java application, or not?
I have looked around the screen Linux manual but couldn't find any screen commands that would show the child processes of a screen session (http://linux.die.net/man/1/screen)
Best Answer
This sounds like a case for
and it also works for several windows within one screen session