Add comment to clarify system proc stat field

This commit is contained in:
Ryan Cobb 2019-06-04 10:04:36 -06:00
parent e9ae881c9a
commit 4c6b1fc23c
1 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,8 @@ module Gitlab
def self.process_start_time
fields = File.read('/proc/self/stat').split
# fields[21] is linux proc stat field "(22) starttime".
# The value is expressed in clock ticks, divide by clock ticks for seconds.
( fields[21].to_i || 0 ) / clk_tck
end
else