9

A process listening on port 8113 (Solr) is not responding. I've found its PID via netstat but the server has about two dozen Solr process running in various screen sessions.

3607.foobar-client2  (12/27/14 20:54:02)     (Detached)
3797.solr.bo.app    (12/25/14 11:51:30)     (Detached)
2962.solr       (12/25/14 11:47:23)     (Detached)
1410.solrTester         (12/25/14 11:39:41)     (Detached)
1348.solrReports (12/25/14 11:38:41)     (Detached)
....

The only way that I've found to identify them involves stopping the processes. I tried identifying them by which files are open by lsof but that was not helpful at all in this circumstance. Is there any way to determine, based on PID, in which screen session a process is running?

1 Answer 1

8

Found it!

To find the screen instance in which PID 351 is running, search the PID 351 environment for the string "STY=":

$ grep -z '^STY=' /proc/351/environ
STY=1410.neverFindMe

Or using ps (if screen session names don't contain space characters):

$ ps wwep 351 | grep -o 'STY=\S*'
STY=1410.neverFindMe
1
  • Thank you Stéphane! You might post that edit as another answer, as it adds very useful information, I would accept it.
    – dotancohen
    Jan 27, 2015 at 11:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .