Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
10-18-2007, 02:30 PM
|
#1
|
LQ Newbie
Registered: Oct 2007
Posts: 16
Rep:
|
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.
|
|
|
10-18-2007, 02:37 PM
|
#2
|
Member
Registered: May 2006
Location: USA
Distribution: FreeBSD Ubuntu Debian
Posts: 137
Rep:
|
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'.
|
|
|
10-18-2007, 02:42 PM
|
#3
|
LQ Newbie
Registered: Oct 2007
Posts: 16
Original Poster
Rep:
|
Quote:
Originally Posted by kav
What you might be looking for is the command 'pstree'.
|
My system doesn't understand pstree. Do I have to run it from a specific directory?
|
|
|
10-18-2007, 02:51 PM
|
#4
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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
|
|
|
10-18-2007, 02:54 PM
|
#5
|
Member
Registered: May 2006
Location: USA
Distribution: FreeBSD Ubuntu Debian
Posts: 137
Rep:
|
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.
|
|
|
10-18-2007, 02:56 PM
|
#6
|
LQ Newbie
Registered: Oct 2007
Posts: 16
Original Poster
Rep:
|
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.
|
|
|
10-18-2007, 02:57 PM
|
#7
|
LQ Newbie
Registered: Oct 2007
Posts: 16
Original Poster
Rep:
|
Quote:
Originally Posted by kav
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.
Thanks again.
|
|
|
10-18-2007, 02:58 PM
|
#8
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Quote:
Originally Posted by dbl8708
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.
|
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.
Cheers,
Tink
|
|
|
10-18-2007, 03:00 PM
|
#9
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Quote:
Originally Posted by dbl8708
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?
Cheers,
Tink
|
|
|
10-18-2007, 03:00 PM
|
#10
|
LQ Newbie
Registered: Oct 2007
Posts: 16
Original Poster
Rep:
|
Ok, thank you Tink.
|
|
|
10-18-2007, 03:03 PM
|
#11
|
LQ Newbie
Registered: Oct 2007
Posts: 16
Original Poster
Rep:
|
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.
|
|
|
10-18-2007, 03:08 PM
|
#12
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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
|
|
|
10-18-2007, 03:09 PM
|
#13
|
Member
Registered: May 2006
Location: USA
Distribution: FreeBSD Ubuntu Debian
Posts: 137
Rep:
|
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 06:25 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|