From owner-freebsd-current@FreeBSD.ORG Fri Sep 17 20:36:49 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D17A2106567A for ; Fri, 17 Sep 2010 20:36:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 6B5908FC15 for ; Fri, 17 Sep 2010 20:36:49 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o8HKajIl096621 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 17 Sep 2010 23:36:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o8HKajLd022048; Fri, 17 Sep 2010 23:36:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o8HKajCK022047; Fri, 17 Sep 2010 23:36:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 17 Sep 2010 23:36:45 +0300 From: Kostik Belousov To: Norberto Lopes Message-ID: <20100917203645.GS2389@deviant.kiev.zoral.com.ua> References: <8C5C36F5-A070-4CBA-8B8C-6751F8D636E1@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uX7BrQs69PbBafpd" Content-Disposition: inline In-Reply-To: <8C5C36F5-A070-4CBA-8B8C-6751F8D636E1@gmail.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_20, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-current@freebsd.org, netchild@freebsd.org Subject: Re: Extend ktrace/kdump output X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 17 Sep 2010 20:36:50 -0000 --uX7BrQs69PbBafpd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 17, 2010 at 09:55:26PM +0200, Norberto Lopes wrote: > Hi. > I've been taking a look at ktrace and kdump in order to get (1) familiar = with the sources and (2) to finally try to give back something to the commu= nity. >=20 > So far from what I've seen, and after reading this thread http://lists.fr= eebsd.org/pipermail/freebsd-arch/2006-April/005107.html it seems that most = of those points got done. >=20 > To warm up I changed the output of the stat structure in order to provide= me with the device name (something I actually find useful for me sometimes) >=20 > Instead of: > 22596 cat STRU struct stat {dev=3D89, ino=3D3320836, mode=3D-r--r-= -r-- , nlink=3D1, uid=3D0, gid=3D0, atime=3D1284725358, stime=3D1284485510,= ctime=3D1284485510, birthtime=3D1284485509, size=3D1172220, blksize=3D1638= 4, blocks=3D2336, flags=3D0x20000 } >=20 > I get this now (including major and minor): > 22596 cat STRU struct stat {dev=3D (/dev/ad4= s1a), ino=3D3320836, mode=3D-r--r--r-- , nlink=3D1, uid=3D0, gid=3D0, atime= =3D1284725358, stime=3D1284485510, ctime=3D1284485510, birthtime=3D12844855= 09, size=3D1172220, blksize=3D16384, blocks=3D2336, flags=3D0x20000 } >=20 > I wouldn't mind having someone help me whenever and if I get stuck on the= technical side (*wink* Alexander Leidinger *wink*) and also to give me mor= e insight on what the road to help in this should be. >=20 > P.S.: I'm still going through "man style" hence no patch attached. If any= one finds this one useful, I'll reply with the patch though.=20 >=20 How do you look up the device name by st_dev ? Note that the number is generated by devfs at the moment of cdev creation. It is only valid on the machine where stat(2) is done, and only due to the next reboot. --uX7BrQs69PbBafpd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkyT0VwACgkQC3+MBN1Mb4jDKQCdHprRPpvbNvS/3YP6M9wCnvNB NNIAoJb4mvgdHGu34JuSV5vVmr9Xc61Q =grLI -----END PGP SIGNATURE----- --uX7BrQs69PbBafpd--