From: Rick K. <rk...@nc...> - 2007-01-08 17:08:36
|
Dawei, One thing you might consider trying is to replace the executable that=20 corresponds to the daemon program with a wrapper script that invokes psrun= =20 on the true daemon program. For example, rename Child.exe to=20 Child.exe.orig and create a new file named Child.exe that is a shell=20 script that runs the command "psrun Child.exe.orig", passing along any=20 arguments necessary for Child.exe. This would be the quickest way to see if things might work as a first cut. Also, psrun does not actually do any performance monitoring itself nor=20 does it write out the XML result documents; this is done through libraries= =20 that are "inserted" into the program that is being monitored. The usual reason for zeroes being reported are that the program does not=20 consume enough CPU time to collect any data, and it sounds like this is=20 what you may be seeing here. Rick On Sun, 7 Jan 2007, liudawei wrote: > Hi: > > I have encountered a problem when I use psrun to profile a Demon process = and its child process is also Demon process. The example is here. > > Psrun -f Daemon.exe > > Iet me describe the how this Daemon work, I want to profile the Daemon a= nd its child process. here, all the child process is daemon process too. Th= e problem I encountered is that all the results(xml file produced by psrun)= is zero. I try to read the source code of the psrun. I guess that psrun wi= ll fork a process to execute the program which is profiled (here is the Dae= mon.exe). But as we know that if the program to be profiled is daemon proce= ss, I think when the daemon process is created successfully, it will kill h= is father process, however, psrun is just waiting for this signal to finish= ed the profile. so, if the Daemon is start,the psrun will stop right now. s= o, all the results is zero. > > Can any one give some suggestion? or give a patch to psrun, so let psrun = can monitor daemon type program. > > You can download the Oracle TimesTen , then use psrun to verify the probl= em I encountred. > > > Waiting for a reply. > > __________________________________________________ > =B8=CF=BF=EC=D7=A2=B2=E1=D1=C5=BB=A2=B3=AC=B4=F3=C8=DD=C1=BF=C3=E2=B7=D1= =D3=CA=CF=E4? > http://cn.mail.yahoo.com |