Date: Wed, 19 Feb 2014 12:20:53 -0700 From: Ian Lepore <ian@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org> Cc: Bruno =?ISO-8859-1?Q?Lauz=E9?= <brunolauze@msn.com>, freebsd-current@FreeBSD.org Subject: Re: Device File Creation Time Message-ID: <1392837653.1145.41.camel@revolution.hippie.lan> In-Reply-To: <201402191344.21738.jhb@freebsd.org> References: <BLU179-W85177DFBBF69A9D7B02C66C6980@phx.gbl> <201402191344.21738.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2014-02-19 at 13:44 -0500, John Baldwin wrote: > On Tuesday, February 18, 2014 3:02:16 pm Bruno Lauzé wrote: > > root@pcbsd:/dev # stat /dev/ada0 > > 1895890688 97 crw-rw-rw- 1 root operator 97 0 "Feb 18 10:52:11 2014" "Feb 17 > 09:36:43 2014" "Feb 17 09:36:43 2014" "Dec 31 17:59:59 1969" 4096 0 0 > /dev/ada0 > > > > root@pcbsd:/dev # stat /dev/ada0p2 > > 1895890688 103 crw-rw-rw- 1 root operator 103 0 "Feb 18 10:52:05 2014" "Feb > 17 09:36:43 2014" "Feb 17 09:36:43 2014" "Dec 31 17:59:59 1969" 4096 0 0 > /dev/ada0p2 > > > > root@pcbsd:/dev # stat /dev/ada0p3 > > 1895890688 105 crw-rw-rw- 1 root operator 105 0 "Feb 18 10:52:21 2014" "Feb > 17 09:36:43 2014" "Feb 17 09:36:43 2014" "Dec 31 17:59:59 1969" 4096 0 0 > /dev/ada0p3 > > > > As we can see all files in devfs reports Dec 31 1969 as creation time. > > > > Can we look to manage this value to know when a certain device was > installed? > > > > It would be really great to know when a disk was replaced. > > > > Would there be any other mechanism to accomplish this? > > I think if you hot attach a device post-boot it will have the time it was > attached as the birth time. I think it is only devices created during boot > that use time 0. > That's actually a time of -1 converted to some local timezone. I'm not sure that's germane, just thought I'd mention it. revolution > date -jur -1 Wed Dec 31 23:59:59 UTC 1969 -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1392837653.1145.41.camel>
