From owner-freebsd-current@FreeBSD.ORG Wed Feb 19 18:58:36 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE5802FC for ; Wed, 19 Feb 2014 18:58:36 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C5A421771 for ; Wed, 19 Feb 2014 18:58:36 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B4F38B95B; Wed, 19 Feb 2014 13:58:35 -0500 (EST) From: John Baldwin To: freebsd-current@freebsd.org Subject: Re: Device File Creation Time Date: Wed, 19 Feb 2014 13:44:21 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201402191344.21738.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 19 Feb 2014 13:58:35 -0500 (EST) Cc: Bruno =?iso-8859-1?q?Lauz=E9?= X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Feb 2014 18:58:37 -0000 On Tuesday, February 18, 2014 3:02:16 pm Bruno Lauz=E9 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=20 09:36:43 2014" "Feb 17 09:36:43 2014" "Dec 31 17:59:59 1969" 4096 0 0=20 /dev/ada0 >=20 > root@pcbsd:/dev # stat /dev/ada0p2 > 1895890688 103 crw-rw-rw- 1 root operator 103 0 "Feb 18 10:52:05 2014" "F= eb=20 17 09:36:43 2014" "Feb 17 09:36:43 2014" "Dec 31 17:59:59 1969" 4096 0 0=20 /dev/ada0p2 >=20 > root@pcbsd:/dev # stat /dev/ada0p3 > 1895890688 105 crw-rw-rw- 1 root operator 105 0 "Feb 18 10:52:21 2014" "F= eb=20 17 09:36:43 2014" "Feb 17 09:36:43 2014" "Dec 31 17:59:59 1969" 4096 0 0=20 /dev/ada0p3 >=20 > As we can see all files in devfs reports Dec 31 1969 as creation time. >=20 > Can we look to manage this value to know when a certain device was=20 installed? >=20 > It would be really great to know when a disk was replaced. >=20 > 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=20 attached as the birth time. I think it is only devices created during boot= =20 that use time 0. =2D-=20 John Baldwin