Determine display or VNC session based on PID
Posted
by
Daniel Kessler
on Super User
See other posts from Super User
or by Daniel Kessler
Published on 2012-08-06T18:42:41Z
Indexed on
2012/08/27
21:42 UTC
Read the original article
Hit count: 236
I frequently VNC into a server where we run many concurrent computationally intensive matlab processes. Sometimes, one of my processes misbehave, which I can see from top, but I have a hard time figuring out which VNC session it's running on, or more specifically, which display it's running on.
Suppose I see that PID 8536 looks like a resource hog, and I want to investigate. Because it's a matlab session, I know there is likely an IDE open somewhere, and I want to check to see if anything important is happening before I kill it.
We've solved this somewhat awkwardly in the past by identifying which PTY 8536 was launched from, then looking at a process tree to figure out things launched in that context, scrolling up, and seeing the VNC initialization.
Seems like there must be a better way to go PID -> X Display (or VNC Session).
© Super User or respective owner