PDA

View Full Version : attaching to a running deamon process



itsme_bill
10-02-2008, 05:30 PM
I am trying to attach to a running deamon process.

I make sure the may process (A) is running and showing up under "top" program.

I am starting totalview as root ( under linux).
Trying to attach to my process (A) but can not find the running process name or PID under processes list that totalview window.

inserting the PID as well as correct full program name I keep getting a dialog that "no attachable process has been selected"

Why I can not see the process "A" in the selection list of processes?

Please advise.
Thanks in advance,
- Bill

PeterT-RogueWave
10-08-2008, 07:36 PM
Hello Bill,

I've tried a test case similar to what you report, but unlike you, I was, as root, able to attach to these daemon processes. Could i be that the daemon is owned by someone other than root? While we basically think of root having access to all processes, the attachability of a process, at least from TotalView's viewpoint, is governed by which processes belong to it. I've verified this by looking at a license manager daemon I have running under my own id. If I first su to root, and try to look for that process, it can't be found. But I can see and attach to other daemons.that do belong to root. If you can figure out who controls the daemon you are interested in, and then su to that user, then you should be able to attach to it.

Let me know if that helps.

Regards,

Josh-TotalView-Tech
10-13-2008, 07:54 AM
Yes, the list of processes TotalView shows the user will be all processes with the same UID of the user running TotalView. However, if you are running as root, you can attach to processes with other UIDs (hopefully with care). Since they are not displayed in the UI, you need to use the CLI to attach to the processes which are not owned by root. Access the CLI by using the Tools > Command Line menu option and use the command dattach.

dattach executable_name pid
Use the command help dattach for further usage scenarios.
[br]