On Wed, Oct 16, 2019 at 10:23:52AM -0500, Scott Cheloha wrote: > Hi, > > Tracking the process starting time as an uptime fixes the classic > "init(8) started in 1969" bug in ps(1) when your CMOS battery dies. > > In general it lets us track how long a process has been running > correctly regardless of whether or not the kernel UTC clock has > jumped. > > NetBSD and FreeBSD have already done this. > > For kernel core dumps we need to do a bit of shuffling in libkvm to > determine the approximate starting time. The granularity is much more > limited in this case, but it's a start. > > I have added nanoboottime(9) here because it simplifies the math > in kern_acct.c. I can commit that first in a separate patch. > > ok?
OK bluhm@ with one remark > + /* Anchor a time to compare process starting times from. */ > + nl[0].n_name = "_time_second"; > + nl[0].n_name = "_time_uptime"; > + nl[0].n_name = NULL; Shouldn't this be nl[0] nl[1] nl[2] ?
