LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Date and time of a process when it was started (https://www.linuxquestions.org/questions/linux-general-1/date-and-time-of-a-process-when-it-was-started-796516/)

mario.almeida 03-19-2010 10:34 AM

Date and time of a process when it was started
 
Hi All,
Centos 5.4 64bit

Would like to know when a particular process was started.

1.
Quote:

ll -d /proc/4014/
dr-xr-xr-x 5 mysql mysql 0 Nov 28 07:34 /proc/4014/
2.
Quote:

ps -o pid,lstart -p 4014
PID STARTED
4014 Tue Nov 17 23:10:13 2009

1) Which one should I consider?
2) why do both have such a difference?

colucix 03-19-2010 10:46 AM

I'd tell the second one. The first one is just the modification time of the directory /proc/4014, that can change under some circumstances (e.g. create or rename files inside the directory).


All times are GMT -5. The time now is 09:57 AM.