This is a simple script to get the Linux birth time of the system or a process using /proc/stat and /proc/pid/stat.
For example, you may get local datetime when process 12345 started:
For example, you may get local datetime when process 12345 started:
import datetime import btime datetime.datetime.fromtimestamp(btime.process_time(12456)[1])
View the source code in github gists:
Comments