Sunday, April 19, 2009

what are the various resources a process is utilizing ?

There was one particular incidence when i am making changes in some conf file but its not taking effect.There were some cases when i am expecting spool directory's path in some other location but postfix is picking up some other location.
In nutshell, we want to see what are the files a particular daemon is using or opening or referring.
Lets be more specific.As i mainly deal with postfix, there are mainly two conf files, master.conf and main.conf. We are interested in knowing what are the files master process is using, i will issue following command to get this info

lsof -c master

it will show all the files,sockets,tcp connections attached to this process.

You may use other processes too to track them down.

Very useful in case you are running out of ideas what next to do if correct thing in correct place( as you think) is not taking place.

I was trying to clear spool directory but master was using different location. I was expecting it to be where it should be(during build i specified) but default postfix installation in OS was forcing different spool location(during booting).

Whole story is too big to mention here. Not in context too.

No comments: