[SFS] When was this server "born"?

David L. Willson dlwillson@sofree.us
Wed, 5 Aug 2015 15:15:32 -0600 (MDT)


------=_Part_12802_771911839.1438809332760
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

I should have started this conversation on CLUE or BLUG. This is probably n=
ot interesting to lots of SFS. Are you on either of those lists?=20

WRT the keys idea: On my Fedora 21 box, there weren't any ssh keys until I =
started the ssh daemon, so no dice.=20

----- Original Message -----

From: "Mike Shoup" <mike@shouptech.com>=20
To: "David L. Willson" <dlwillson@sofree.us>=20
Cc: "sfs" <sfs@thegeek.nu>=20
Sent: Wednesday, August 5, 2015 2:38:24 PM=20
Subject: Re: [SFS] When was this server "born"?=20

Near as I can tell, XFS doesn't store that information:=20

~=20
[mike@voyager]$ sudo xfs_info /=20
meta-data=3D/dev/mapper/centos_voyager-root isize=3D256 agcount=3D4, agsize=
=3D1147392 blks=20
=3D sectsz=3D512 attr=3D2, projid32bit=3D1=20
=3D crc=3D0 finobt=3D0=20
data =3D bsize=3D4096 blocks=3D4589568, imaxpct=3D25=20
=3D sunit=3D0 swidth=3D0 blks=20
naming =3Dversion 2 bsize=3D4096 ascii-ci=3D0 ftype=3D0=20
log =3Dinternal bsize=3D4096 blocks=3D2560, version=3D2=20
=3D sectsz=3D512 sunit=3D0 blks, lazy-count=3D1=20
realtime =3Dnone extsz=3D4096 blocks=3D0, rtextents=3D0=20


___=20


You could probably look at the ctime of a unique file for each machine, tha=
t gets created at install time. What about the host's SSH key? I don't thin=
k most places change those very often.=20

~=20
[mike@voyager]$ stat /etc/ssh/ssh_host_rsa_key=20
File: =E2=80=98/etc/ssh/ssh_host_rsa_key=E2=80=99=20
Size: 1675 Blocks: 8 IO Block: 4096 regular file=20
Device: fd00h/64768d Inode: 416880 Links: 1=20
Access: (0640/-rw-r-----) Uid: ( 0/ root) Gid: ( 999/ssh_keys)=20
Access: 2015-08-05 12:48:27.021065883 -0600=20
Modify: 2015-04-26 20:05:46.378871265 -0600=20
Change: 2015-04-26 20:05:46.457871265 -0600=20
Birth: -=20


--=20
Mike=20


On Wed, Aug 5, 2015 at 2:13 PM, David L. Willson < dlwillson@sofree.us > wr=
ote:=20


BCC: LPIC-1 Study Group=20

"Born On Date"=20

Sometimes it's useful to know when this server was "born", when it was buil=
t. Usually, you also want to know who built it, so you know who to question=
 or kick, but that's a topic for another day.=20

The root filesystem was usually created on the same day, so that is the dat=
e I use. To get that date, if your root filesystem is ext2/3/4, run dumpe2f=
s and look for 'created'.=20

Here's an example:=20

[dwills003c@wdv-logecoll nagios]$ sudo df -hT /=20
Filesystem Type Size Used Avail Use% Mounted on=20
/dev/sdi6 ext3 70G 32G 35G 48% /=20
[dwills003c@wdv-logecoll nagios]$ sudo /sbin/dumpe2fs /dev/sdi6 | grep -iC =
3 created=20
dumpe2fs 1.39 (29-May-2006)=20
Fragments per group: 32768=20
Inodes per group: 32736=20
Inode blocks per group: 1023=20
Filesystem created: Tue Jan 25 06:44:25 2011=20
Last mount time: Fri Jul 31 09:02:54 2015=20
Last write time: Fri Jul 31 09:02:54 2015=20
Mount count: 10=20

Now, Fedora Server 22 and Enterprise Linux 7 have moved to xfs. How do you =
get the same information from it? I don't know... yet.=20
_______________________________________________=20
SFS mailing list=20
SFS@thegeek.nu=20
http://mailman.thegeek.nu/mailman/listinfo/sfs=20






------=_Part_12802_771911839.1438809332760
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><body><div style=3D"font-family: times new roman, new york, times, se=
rif; font-size: 12pt; color: #000000"><div>I should have started this conve=
rsation on CLUE or BLUG. This is probably not interesting to lots of SFS. A=
re you on either of those lists?</div><div><br></div><div>WRT the keys idea=
: On my Fedora 21 box, there weren't any ssh keys until I started the ssh d=
aemon, so no dice.<br></div><div><br></div><hr id=3D"zwchr"><div style=3D"c=
olor:#000;font-weight:normal;font-style:normal;text-decoration:none;font-fa=
mily:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Mike Shoup" =
&lt;mike@shouptech.com&gt;<br><b>To: </b>"David L. Willson" &lt;dlwillson@s=
ofree.us&gt;<br><b>Cc: </b>"sfs" &lt;sfs@thegeek.nu&gt;<br><b>Sent: </b>Wed=
nesday, August 5, 2015 2:38:24 PM<br><b>Subject: </b>Re: [SFS] When was thi=
s server "born"?<br><div><br></div><div dir=3D"ltr"><div>Near as I can tell=
, XFS doesn't store that information:<br><div><br></div>~<br>[mike@voyager]=
$ sudo xfs_info /<br>meta-data=3D/dev/mapper/centos_voyager-root isize=3D25=
6&nbsp;&nbsp;&nbsp; agcount=3D4, agsize=3D1147392 blks<br>&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; sectsz=3D512&nbsp;&nbsp; attr=3D2, projid32bit=3D1<br>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; crc=3D0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp; finobt=3D0<br>data&nbsp;&nbsp;&nbsp;&nbsp; =3D&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bsize=3D4096&nbsp;&nbsp; blocks=3D45895=
68, imaxpct=3D25<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sunit=3D0&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; swidth=3D0 blks<br>naming&nbsp;&nbsp; =3Dversion 2&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b=
size=3D4096&nbsp;&nbsp; ascii-ci=3D0 ftype=3D0<br>log&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; =3Dinternal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bsize=3D4096&nbsp;&nbsp; blocks=3D2560, versi=
on=3D2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sectsz=3D512&nbsp;&nbsp; sunit=
=3D0 blks, lazy-count=3D1<br>realtime =3Dnone&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; extsz=3D4096&nbsp;&nbsp; blocks=3D0, rtextents=3D0<br><div><br></div><b=
r>___<br><div><br></div><br></div><div>You could probably look at the ctime=
 of a unique file for each machine, that gets created at install time. What=
 about the host's SSH key? I don't think most places change those very ofte=
n.<br><div><br></div>~<br>[mike@voyager]$ stat /etc/ssh/ssh_host_rsa_key<br=
>&nbsp; File: =E2=80=98/etc/ssh/ssh_host_rsa_key=E2=80=99<br>&nbsp; Size: 1=
675&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Blocks: 8&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IO Block: 4096&nbsp;&nbsp; regula=
r file<br>Device: fd00h/64768d&nbsp;&nbsp;&nbsp; Inode: 416880&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; Links: 1<br>Access: (0640/-rw-r-----)&nbsp; Uid: (&nbsp;&=
nbsp;&nbsp; 0/&nbsp;&nbsp;&nbsp; root)&nbsp;&nbsp; Gid: (&nbsp; 999/ssh_key=
s)<br>Access: 2015-08-05 12:48:27.021065883 -0600<br>Modify: 2015-04-26 20:=
05:46.378871265 -0600<br>Change: 2015-04-26 20:05:46.457871265 -0600<br>&nb=
sp;Birth: -<br></div><div><br><div><br></div></div><div>--<br></div><div>Mi=
ke<br></div><div><br></div><div class=3D"gmail_extra"><br><div class=3D"gma=
il_quote">On Wed, Aug 5, 2015 at 2:13 PM, David L. Willson <span dir=3D"ltr=
">&lt;<a href=3D"mailto:dlwillson@sofree.us" target=3D"_blank">dlwillson@so=
free.us</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D=
"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">BCC: LPIC-1=
 Study Group<br>
<br>
"Born On Date"<br>
<br>
Sometimes it's useful to know when this server was "born", when it was buil=
t. Usually, you also want to know who built it, so you know who to question=
 or kick, but that's a topic for another day.<br>
<br>
The root filesystem was usually created on the same day, so that is the dat=
e I use. To get that date, if your root filesystem is ext2/3/4, run dumpe2f=
s and look for 'created'.<br>
<br>
Here's an example:<br>
<br>
[dwills003c@wdv-logecoll nagios]$ sudo df -hT /<br>
Filesystem&nbsp; &nbsp; Type&nbsp; &nbsp; Size&nbsp; Used Avail Use% Mounte=
d on<br>
/dev/sdi6&nbsp; &nbsp; &nbsp;ext3&nbsp; &nbsp; &nbsp;70G&nbsp; &nbsp;32G&nb=
sp; &nbsp;35G&nbsp; 48% /<br>
[dwills003c@wdv-logecoll nagios]$ sudo /sbin/dumpe2fs /dev/sdi6 | grep -iC =
3 created<br>
dumpe2fs 1.39 (29-May-2006)<br>
Fragments per group:&nbsp; &nbsp; &nbsp; 32768<br>
Inodes per group:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;32736<br>
Inode blocks per group:&nbsp; &nbsp;1023<br>
Filesystem created:&nbsp; &nbsp; &nbsp; &nbsp;Tue Jan 25 06:44:25 2011<br>
Last mount time:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Fri Jul 31 09:02:54 2015=
<br>
Last write time:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Fri Jul 31 09:02:54 2015=
<br>
Mount count:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10<br>
<br>
Now, Fedora Server 22 and Enterprise Linux 7 have moved to xfs. How do you =
get the same information from it? I don't know... yet.<br>
_______________________________________________<br>
SFS mailing list<br>
<a href=3D"mailto:SFS@thegeek.nu" target=3D"_blank">SFS@thegeek.nu</a><br>
<a href=3D"http://mailman.thegeek.nu/mailman/listinfo/sfs" rel=3D"noreferre=
r" target=3D"_blank">http://mailman.thegeek.nu/mailman/listinfo/sfs</a><br>
</blockquote></div><br></div></div>
</div><div><br></div></div></body></html>
------=_Part_12802_771911839.1438809332760--