what command?
Hey, sorry but I have an easy request...
What is a command I can use to list the dependencies of a particular process? In other words say I have a process (ProcessX) that I can see has a pid of 15854 using ps -elf | grep ProcessX... What command can I use to list the processes that this process (ProcessX) is dependent on? Thank you in advance. |
That is a terrible thread name. You should have called it something like "list process dependencies command?" It would get read more, answered by someone smarter than me, and answered sooner.
What you might be looking for is the command 'pstree'. |
Quote:
My system doesn't understand pstree. Do I have to run it from a specific directory? |
What do you mean by "depend on"? Processes may have a PPID (parent
process ID) which is your 5th column ... but that won't tell you whether for example your spam filter depends on the working instance of postgres. To find that you'll have to follow the ldd <your executables> output, and that will only tell you whether the "dependency" was compiled in, and not whether it's actually required to be working. That kind of "dependency" you'll only find out from looking at the configuration of the process you're after. Over all you inquiry is indeed badly worded :} Cheers, Tink |
I an not in a position to tell you where things are in your system. You may or may not have pstree, I wouldn't know. Even if I knew what your system was I might not be familiar with it.
Tinkster is also right. We don't know if you mean compiled in dependencies or running dependencies. It might help to know what you actually need here and why. |
Ok, let me try to clarify my request ;)
In windows you can do a sc qc ServiceX and it will list the other services that are required to be running in order for your selected service (ServiceX) to start. Is there an equivalent command for linux? Thank you, and sorry for the confusion. |
Quote:
Thanks again. |
Quote:
solaris' svc command, which does something similar, but I don't know who does. The distro's I'm currently using don't. Cheers, Tink |
Quote:
write anything away to logs? Also: which distro are you using? Cheers, Tink |
Ok, thank you Tink.
|
It is a proprietary process and logs only indicate that the process is not starting but don't list why. The only parent process listed is pid 1 which is init but I wasn't sure if init is the only "required" process to be running for this specific process to start.
Thank you for your help. |
Well ... the next steps would be:
a) ldd /path/to/your/process-executable ... see whether LIBRARIES it needs aren't there. b) strace -o /tmp/logging /path/to/your/process-executable and check whether strace reveals what the thing is trying to do, and where or why it carks it ..... Cheers, Tink |
Are you typing it into a command line? If so post the exact output.
Or is it trying to start at boot and failing? If so you might find some bread crumbs in dmesg. That's where I look when things mysteriously don't start. You would probably be better off consulting the vendor with this kind of problem, especially since you seem unwilling to reveal what this application is or what it might do. |
All times are GMT -5. The time now is 07:08 AM. |