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.
hay guys
i am in a red hat course and in need to check if deamons that belongs to a service (chronyd)are running.
in the book they do it by ps -p PID
but when i do this i get this output:
as you can see i dont get nothing.
why is that and how i can verifay that the deamon is running?
the assigment is that i need to verifay that that those deamons are running
but i dont understand the output - it is just headlines...
it dosent tell me if it is running or not
first of all tnx for the help!!
so.. in my example under all of them theres is nothing excpet for the main PID and even then theres is a "?" under tty.
unlike youre example that there is time and in my example the time is 00:00 and in yours there is time that have past...
i am passing the pid's from the the command "systemctl status chronyd" whic are:
728
661
and the main PID: 675
In your screenshot you use incorrect PIDs 728 and 661 - there are no processes that have such PIDs on your system. In my example above I've used 9999 as a fake PID to represent the situation. Notice that my version of ps acts identically to yours and only prints header when non-existent PID is given and sets $? to non-zero.
In your screenshot you use incorrect PIDs 728 and 661 - there are no processes that have such PIDs on your system. In my example above I've used 9999 as a fake PID to represent the situation. Notice that my version of ps acts identically to yours and only prints header when non-existent PID is given and sets $? to non-zero.
but than why are "728","661" cant be procces number? this is what i dont understand...
like in these blue box in i draw in the pic below (which you talked about erliar)
i mean - 728 661 - why cant it be a processes if that's what the command return (again in the blue box i draw)
i can use the 675 like on "ps -p 675" then why not "ps -p 661/728" ? the systemctl command show those numbers as proccess
Last edited by fick_manning; 10-07-2018 at 04:50 PM.
but than why are "728","661" cant be procces number? this is what i dont understand...
like in these blue box in i draw in the pic below (which you talked about erliar) Attachment 28752
i mean - 728 661 - why cant it be a processes if that's what the command return (again in the blue box i draw)
i can use the 675 like on "ps -p 675" then why not "ps -p 661/728" ? the systemctl command show those numbers as proccess
Those processes have already ended. The only one continuing to run (the daemon) is 675
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.