Process start time and running time do not match

py9 asked:

We have a situation where times present by START TIME and TIME presented by “ps” are not matching. When I say matching I mean – TIME shows that a service is running longer than it actually is.

Example:

someuser    29953  7.9 30.2 4928524 1171844 ?     Sl   15:47   2:10 /some/process

# date
Thu Mar 22 16:15:28 UTC 2018

# stat /proc/29953
  File: ‘/proc/29953’
  Size: 0           Blocks: 0          IO Block: 1024   directory
Device: 3h/3d   Inode: 134924297   Links: 9
Access: (0555/dr-xr-xr-x)  Uid: (6198888/   someuser)   Gid: (6198882/somegroup)
Context: system_u:system_r:unconfined_service_t:s0
Access: 2018-03-22 15:47:41.571718526 +0000
Modify: 2018-03-22 15:47:41.571718526 +0000
Change: 2018-03-22 15:47:41.571718526 +0000
 Birth: -

Running time appears to be 2 hours and 10 minutes, while the service was started only 30 minutes ago.
How is this possible? Why is “TIME” being show incorrectly.

My answer:


2:10 running time means 2 minutes 10 seconds.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.