2

How do I get the current process creation time using c/c++ on Linux? When I'm opening the file /proc//stat
The output is just a bunch of numbers. How do I know which one of them is the creation time?

Ohad Horesh
  • 4,340
  • 6
  • 28
  • 45

2 Answers2

1

The manpage lists the order and meaning of the values of /proc/[pid]/stat. This answer more information.

Community
  • 1
  • 1
Matt Joiner
  • 112,946
  • 110
  • 377
  • 526
0

I suggest you look into man 5 proc. On my system, the 22nd entry is the start time.

filmor
  • 30,840
  • 6
  • 50
  • 48