1845896 Members
4017 Online
110250 Solutions
New Discussion

Re: PS

 
Jason Tan
Advisor

PS

1)is ps command will show every process that run on the server? is there anyway that a process can hide from ps command?

2)is all the root user share the same crontab?

3)how to show all the user that do have crontab?
smtan
5 REPLIES 5
T G Manikandan
Honored Contributor

Re: PS

ps -eaf should show all processes.

Users have their own crontab.

you can check the /var/spool/cron/crontabs dir.Here each user have a seperate crontab file.

To edit the crontab file for a user use

#crontab -e

Thanks
Rajeev  Shukla
Honored Contributor

Re: PS

1.No there is no way a process can hide from ps. This will list all the process at that instance.

2. No each user has its own crontab, the files for each user cron is kept in /var/spool/cron/crontabs directory.

3. The file /var/adm/cron/cron.allow and /var/adm/cron/cron.deny define which user can access crontabs.

Go through man pages of crontab and you see the rules of both files.

Cheers
Rajeev
Patrick Wallek
Honored Contributor

Re: PS

1) Already answered.

2) I'm not sure what you are asking. There can only be 1 "root" user on a system. So only 1 crontab for the root user. If you have other users with a uid of 0, then they MAY be able to have their own crontab, I am not sure.

3) 'ls /var/spool/cron/crontabs' will list all crontabs defined on the system. If you are logged in as root and want to look at another users crontab do a 'crontab -l username' (NOTE: This only works on HP-UX 11.X) or you can do a 'cat /var/spool/cron/crontabs/username'

Chris Wilshaw
Honored Contributor

Re: PS

1) As above.

2) Any user with UID of 0 will use the root crontab file.

3) For other users to be able to use cron, they also need an entry in /var/adm/cron/cron.allow
Ravi_8
Honored Contributor

Re: PS

Hi

ps shows process running in that session only.whereas pa -aef shows all processes on server.

crontab will be different for each user, root will be having it's own crontab file.

In /var/adm/crom/cron.allow file if the user exist he/she can create/edit/delete their own crontab file

never give up