From owner-freebsd-current@FreeBSD.ORG Sat Oct 8 14:24:42 2011 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 5F602106564A for ; Sat, 8 Oct 2011 14:24:42 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.29.7]) by mx1.freebsd.org (Postfix) with ESMTP id E55738FC0C for ; Sat, 8 Oct 2011 14:24:41 +0000 (UTC) Received: from [78.34.154.169] (helo=fabiankeil.de) by smtprelay03.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1RCXpN-0003wK-I9 for freebsd-current@freebsd.org; Sat, 08 Oct 2011 16:24:40 +0200 Date: Sat, 8 Oct 2011 16:24:29 +0200 From: Fabian Keil To: freebsd-current@freebsd.org Message-ID: <20111008162429.5bc23116@fabiankeil.de> In-Reply-To: <3F00228B-857B-472E-926B-9BEFE9B3557A@freebsd.org> References: <3F00228B-857B-472E-926B-9BEFE9B3557A@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/8K6MN3iM4K_ijZ42UrAG6l1"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 Subject: Re: A patch for a bug in the dtrace command... 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: Sat, 08 Oct 2011 14:24:42 -0000 --Sig_/8K6MN3iM4K_ijZ42UrAG6l1 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable George Neville-Neil wrote: > I have found that the dtrace command on FreeBSD, in both STABLE and HEAD,= does not print out > aggregations properly, likely due to the difference in how Solaris and Fr= eeBSD signals work. > For example, this one liner will give no output: >=20 > sudo dtrace -n 'syscall:::entry { @[execname] =3D quantize(arg0); }' Acutally it works when not using sudo or when killing dtrace by sending a SIGTERM instead of using the keyboard. Of course it's still a bug. > While is should print this: >=20 > dtrace -n 'syscall:::entry { @[execname] =3D quantize(arg0); }' > dtrace: description 'syscall:::entry ' matched 1028 probes > ^C >=20 > nrpe2 =20 > value ------------- Distribution ------------- count =20 > 2 | 0 =20 > 4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12 =20 > 8 | 0 =20 >=20 > sshd =20 > value ------------- Distribution ------------- count =20 > 0 | 0 =20 > 1 |@@@@@@@@@@ 5 =20 > 2 |@@@@@@@@@@@@@@ 7 =20 > 4 | 0 =20 > 8 |@@@@@@@@@@@@@@@@ 8 =20 > 16 | 0 =20 >=20 > etc. >=20 > I have made the following patch, but I'd be interested in people testing = and commenting on it. I do not know whether dtrace or sudo is responsible for the problem, but I can confirm that the patch works for me. Thanks a lot. Fabian --Sig_/8K6MN3iM4K_ijZ42UrAG6l1 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6QXSUACgkQBYqIVf93VJ2p6wCeN6/v4BLUUcTYkSlHNvRHrYGh yf4AoK6VD0R8a3ElZQJ+HrMJsWx3yWVi =Qonf -----END PGP SIGNATURE----- --Sig_/8K6MN3iM4K_ijZ42UrAG6l1--