[PLUG] Finding application parent PID?
Russell Senior
seniorr at aracnet.com
Sun Jan 25 22:00:03 UTC 2004
>>>>> "Alex" == Alex Daniloff <alex at daniloff.com> writes:
Alex> The question is very simple :)
Alex> Some applications have .pid files with the process id. Look for
Alex> example into /var/run directory The other pid's are listed as
Alex> directories in /proc. There is a file cmdline in the each pid
Alex> directory, which shows with what command an application or a
Alex> process was launched.
Alex> Now I want to determine pid of an application or a process
Alex> without using 'ps -ef|grep appl_name' or scanning all
Alex> /proc/proc_id/cmdline files. pidof appl_name doesn't provide a
Alex> definite answer all the time.
Alex> Is there any other way to find pid of application by the name of
Alex> application or the name of its executable file?
yeah, launch the program that you care about in such a way that the
pid is recorded somewhere.
If you don't like typing the command that gives you what you want,
make a shell script out of it.
Am I not understanding what you are after? What characteristic of
'pidof foo' doesn't work? Examples?
--
Russell Senior ``I have nine fingers; you have ten.''
seniorr at aracnet.com
More information about the PLUG
mailing list