Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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'.
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 :}
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.
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.
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.
I have a process that won't start, I am trying to be able to tell if it is because a "dependent" service is failing. Just trying to follow the bread crumbs to find the root cause.
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.
Nope. Not per se. Some people may be adapting
solaris' svc command, which does something similar,
but I don't know who does. The distro's I'm currently
using don't.
I have a process that won't start, I am trying to be able to tell if it is because a "dependent" service is failing. Just trying to follow the bread crumbs to find the root cause.
Thanks again.
What is that process, and when it "fails to start", does it
write anything away to logs? Also: which distro are you
using?
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.
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 .....
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.