1829415 Members
2442 Online
109991 Solutions
New Discussion

process logging

 
SOLVED
Go to solution
Aaron_4
Advisor

process logging

I am trying to find out what and how many processes start when I am running a certain executable. The exec works too fast to just do a ps -ef.
awmorris
4 REPLIES 4
harry d brown jr
Honored Contributor

Re: process logging


I'm confused! You start a program and you want to know how many processes start? Did you write this application or did someone else??

You could run process accounting or maybe glance will help you?

live free or die
harry
Live Free or Die
Stefan Farrelly
Honored Contributor
Solution

Re: process logging


I think the best thing to do is switch on process accounting temporarily. Switch it on only for the userid you are using to execute the binary (not root as too many other processes running under root). You can easily switch it on using SAM, then run your executable, then switch it off and look at the logs (via SAM) and you will see exactly which/what processes got spawned off.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Allan Pincus
Frequent Advisor

Re: process logging

Aaron,

Here's a little script that might work.

Suppose the process you are interested in is called myProcess. Try the following:

MYPID=`ps -ef|grep myProcess | cut -c 10-14`

ps -ef | grep $MYPID

This should report a list of processes whose parent process is "myProcess"

Good luck!

- Allan
Aaron_4
Advisor

Re: process logging

Harry,
This is one function of a commercial application.

I will look at process accounting and try the script.
awmorris