I am trying to retrieve the time a which a certain process is starting. SO I do
ps -ef | grep nameofprocess | awk field I need
The field I need is $5 the time field. However for processes running more than 24 hours it just gives me the date in "Jun 21" format otherwise it gives me the exact time eg "09:14:47". Is there anyway you can get the exact time for process older than 24 hours?
Secondly as the formats are differect for time date (and as the there is a space between month and day ) it is proving difficult.
Can anyone shed light to how I could
(1) Find full time date
and/or
(2) how I would manage to determine whether or not process is more than 24 hours?
ps -ef | grep nameofprocess | awk field I need
The field I need is $5 the time field. However for processes running more than 24 hours it just gives me the date in "Jun 21" format otherwise it gives me the exact time eg "09:14:47". Is there anyway you can get the exact time for process older than 24 hours?
Secondly as the formats are differect for time date (and as the there is a space between month and day ) it is proving difficult.
Can anyone shed light to how I could
(1) Find full time date
and/or
(2) how I would manage to determine whether or not process is more than 24 hours?