LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   Service Start Date and Time - Red Hat Enterprise Linux 5.x (https://www.linuxquestions.org/questions/linux-enterprise-47/service-start-date-and-time-red-hat-enterprise-linux-5-x-746969/)

asimba 08-12-2009 06:31 AM

Service Start Date and Time - Red Hat Enterprise Linux 5.x
 
Hi,

Does anybody know if there is some command to check what date and time a given service was started or stopped.

(PS : I do not want to check logs - I did dig logs and did not find anything significant there)

Regards,

A

MensaWater 08-12-2009 07:30 AM

Don't know of any log off the top of my head.

However, for start of running services usually there is a pid file with same name as service in /var/run. The date/time stamp on those files should give you a good idea on when the running services were started.

/var/run/sendmail.pid would be a good example.

Also some things in /var/run you can figure out - for example there is a cups directory that contains a socket file. The time on that socket is when cups last started.

The above files get deleted when the service stops.

Of course you could always create your own logging by adding syntax to each of the scripts in /etc/init.d that start/stop the services.

asimba 08-12-2009 07:37 AM

I will give it a try ... As for time being - I am into kinda forensics - checking a few servers in cluster. I cannot make any changes due some reasons.

But sure, I will give it a try.

Thank you jlightner!


All times are GMT -5. The time now is 05:29 AM.