From owner-freebsd-dtrace@FreeBSD.ORG Tue Dec 10 23:43:18 2013 Return-Path: Delivered-To: freebsd-dtrace@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 94E2A3C2 for ; Tue, 10 Dec 2013 23:43:18 +0000 (UTC) Received: from mail-ee0-x235.google.com (mail-ee0-x235.google.com [IPv6:2a00:1450:4013:c00::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 30CAF1B5E for ; Tue, 10 Dec 2013 23:43:18 +0000 (UTC) Received: by mail-ee0-f53.google.com with SMTP id b57so2559993eek.40 for ; Tue, 10 Dec 2013 15:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=HgAaRvkS9VmcETXKRrhMQwl/UaFbU8nbrQk9uNA0mTU=; b=TlZ7DHQJNsXgO5o7tLR5a0foWVIr3IQykp519mVHmbmnCx8WtcTluZAxGlcsj8eY8K MMMrpsEodjbjitsxwWtvYSLbWFavEFFp5jWN7yP60D5cVzb1aSgGYMdklB1NtR2s1B1j Yphh+FdHLOuqeQfHlUQitzMAqVGCifPcxUHJLVPEA3ObxVdUnMj4Au3hOksfJM0R+yid vLkk4+gDoAEbi3i2JaZbCOFo90acDU2rBhHmMJi8It6wJda0W3gRPEhNKGFwhUka3pxH A3sHQTSHrNif52UAk56po9KFz/JzNXJ4/zUEa3I2Wqq8ZTfuCczEhIWVQes3UUqKKXQ4 iekQ== MIME-Version: 1.0 X-Received: by 10.14.6.5 with SMTP id 5mr20404169eem.51.1386718996648; Tue, 10 Dec 2013 15:43:16 -0800 (PST) Received: by 10.14.2.66 with HTTP; Tue, 10 Dec 2013 15:43:16 -0800 (PST) Date: Tue, 10 Dec 2013 15:43:16 -0800 Message-ID: Subject: Examples from www.dtracebook.com From: hiren panchasara To: freebsd-dtrace@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 23:43:18 -0000 http://www.dtracebook.com/index.php/Introduction_to_DTrace:read-syscall.d $ sudo dtrace -n 'syscall::read:entry /execname != "dtrace"/ { @reads[execname, fds[arg0].fi_pathname] = count(); }' dtrace: invalid probe specifier syscall::read:entry /execname != "dtrace"/ { @reads[execname, fds[arg0].fi_pathname] = count(); }: in action list: fds has not yet been declared or assigned This is on FreeBSD -head. $ sudo dtrace -l | grep " read entry" 49341 syscall freebsd32 read entry 50413 syscall freebsd read entry What am I missing? What does "invalid probe specifier " mean here? cheers, Hiren From owner-freebsd-dtrace@FreeBSD.ORG Tue Dec 10 23:47:16 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47C7142F for ; Tue, 10 Dec 2013 23:47:16 +0000 (UTC) Received: from albert.catwhisker.org (mx.catwhisker.org [198.144.209.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E64C81C86 for ; Tue, 10 Dec 2013 23:47:15 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.7/8.14.7) with ESMTP id rBANlEVo019347; Tue, 10 Dec 2013 15:47:14 -0800 (PST) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.7/8.14.7/Submit) id rBANlE77019346; Tue, 10 Dec 2013 15:47:14 -0800 (PST) (envelope-from david) Date: Tue, 10 Dec 2013 15:47:14 -0800 From: David Wolfskill To: hiren panchasara Subject: Re: Examples from www.dtracebook.com Message-ID: <20131210234714.GQ1681@albert.catwhisker.org> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gblAvmLjk8yGG9If" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) Cc: freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 23:47:16 -0000 --gblAvmLjk8yGG9If Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 10, 2013 at 03:43:16PM -0800, hiren panchasara wrote: > http://www.dtracebook.com/index.php/Introduction_to_DTrace:read-syscall.d >=20 > $ sudo dtrace -n 'syscall::read:entry /execname !=3D "dtrace"/ { > @reads[execname, fds[arg0].fi_pathname] =3D count(); }' > dtrace: invalid probe specifier syscall::read:entry /execname !=3D > "dtrace"/ { @reads[execname, fds[arg0].fi_pathname] =3D count(); }: in > action list: fds has not yet been declared or assigned >=20 > This is on FreeBSD -head. >=20 >=20 > $ sudo dtrace -l | grep " read entry" > 49341 syscall freebsd32 read entry > 50413 syscall freebsd read entry >=20 > What am I missing? What does "invalid probe specifier " mean here? > .... Exactly what the message says: "fds has not yet been declared or assigned". We don't presently have the fds array -- see p. 131 of the book. Peace, david --=20 David H. Wolfskill david@catwhisker.org Taliban: Evil cowards with guns afraid of truth from a 14-year old girl. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --gblAvmLjk8yGG9If Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQJ8BAEBCgBmBQJSp6gBXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RThEMDY4QTIxMjc1MDZFRDIzODYzRTc4 QTY3RjlDOERFRjQxOTNCAAoJEIpn+cje9Bk7CgAP/3Mldbj1RNv2bvG4kttnmK2k +jOt/NO9UG4S/wlQHX+VmkXXwv7DG9cT1WGO/kKwN+klnLXrtVAubWc+fpCbmHJ3 vc53gud5soEyhSIeFNnlmdhrnERyytVPC29hnCDcLaiOr7oVzbQYfNqJn4rbBJL8 6S6iEgzDMsFcuaS+v20ga4h/cenA/6NUyb97s9lWowdlmU2E+JS5v4i370NLrp43 scBFmCJjrWCklo9SvXTjtMSL/+Rsnhx1ZySXVuBXG8D48wXtic899F+GSPamJ53n FeyRwbCU/P/siJ08U2u9lCzTH4XN3f0Ys4StrFhEBhbKFpana/9CG4DA1CT/Mkw7 hoYTa/scJ+9ab4HhYHPuW9+3kgNcAnPsZO42gMqrNaT6rIMmvrD+HZ6mWQYVzWcl OVsWdN5IQv1kdF1w4mxD8CO0LoSZUnR+A/GPd5OS8a+W+bRuoHvT+IhZGSiA2R4+ TA030LwkAeK/R/cpemF09ZOAu43P5oCK5qOqlbEBTg96GgzjhuH4hfIHhwpWAYTj TxjKf4nkJqkbfELhw87ix0mOUyj/4cE0YuH3NrzF0/utAb+AW0Cey3w+RDGcpecS pzHc1jSMuu+tc3DoRVw8HMoyuPnp6QTEeiZY/vHLkutn/xoLp+GWsDx43fZ6Pp+x y+bKn8KZqmq21XaI+3m4 =lmaP -----END PGP SIGNATURE----- --gblAvmLjk8yGG9If-- From owner-freebsd-dtrace@FreeBSD.ORG Tue Dec 10 23:59:40 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49ECE790 for ; Tue, 10 Dec 2013 23:59:40 +0000 (UTC) Received: from mail-ee0-x234.google.com (mail-ee0-x234.google.com [IPv6:2a00:1450:4013:c00::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D6D6E1D30 for ; Tue, 10 Dec 2013 23:59:39 +0000 (UTC) Received: by mail-ee0-f52.google.com with SMTP id d17so2559210eek.11 for ; Tue, 10 Dec 2013 15:59:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=a44lKQuL3Oo5cc++oO+Jb8qdJ3eTtdijI16/gO1U8Ds=; b=p0Hnwp6rKqiEZLLoPhL3tq76oyHN0nLIaYUn8zzcjn1wZ3BkB7hOFkMSGrw8Gql2QL GBtFLzeqaY79t3YvsEpeYHqpVAvhHsiAmpurmduaHyWZoYmAIuwnf8h3QKT2eisKBe6o pysFj7rKkitf/rEziORtYcDmd25aaQwWO+LVrgVv+9JlUVeit+X+7yhgyxpkzGY31awc oS6RkBEDKfVIBtV8Pgvl4grKuv86/KnUkwf2YH/FrDQP2SGLUWBl1p4NszUal2x0blVK 6cEiQMhjQIGiiPN3vAch73bKMEZxlOgfEpux73gPhkrD5lOMR7geV1OpeD5mHmJmvJcO m4Ow== MIME-Version: 1.0 X-Received: by 10.14.149.139 with SMTP id x11mr20532236eej.35.1386719978345; Tue, 10 Dec 2013 15:59:38 -0800 (PST) Received: by 10.14.2.66 with HTTP; Tue, 10 Dec 2013 15:59:38 -0800 (PST) In-Reply-To: <20131210234714.GQ1681@albert.catwhisker.org> References: <20131210234714.GQ1681@albert.catwhisker.org> Date: Tue, 10 Dec 2013 15:59:38 -0800 Message-ID: Subject: Re: Examples from www.dtracebook.com From: hiren panchasara To: David Wolfskill Content-Type: text/plain; charset=UTF-8 Cc: freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2013 23:59:40 -0000 On Tue, Dec 10, 2013 at 3:47 PM, David Wolfskill wrote: > On Tue, Dec 10, 2013 at 03:43:16PM -0800, hiren panchasara wrote: >> http://www.dtracebook.com/index.php/Introduction_to_DTrace:read-syscall.d >> >> $ sudo dtrace -n 'syscall::read:entry /execname != "dtrace"/ { >> @reads[execname, fds[arg0].fi_pathname] = count(); }' >> dtrace: invalid probe specifier syscall::read:entry /execname != >> "dtrace"/ { @reads[execname, fds[arg0].fi_pathname] = count(); }: in >> action list: fds has not yet been declared or assigned >> >> This is on FreeBSD -head. >> >> >> $ sudo dtrace -l | grep " read entry" >> 49341 syscall freebsd32 read entry >> 50413 syscall freebsd read entry >> >> What am I missing? What does "invalid probe specifier " mean here? >> .... > > Exactly what the message says: "fds has not yet been declared or > assigned". We don't presently have the fds array -- see p. 131 of the > book. Ah, thanks David :-) $ sudo dtrace -n 'syscall::read:entry /execname != "dtrace"/ { @reads[execname] = count(); }' dtrace: description 'syscall::read:entry ' matched 2 probes ^C devd 1 stty 2 sendmail 7 top 10 bash 54 sshd 297 grep 5856 First column is proc name and second one is number of read(2) calls. cheers, Hiren ps: I will keep posting here as I find something that I do not understand. From owner-freebsd-dtrace@FreeBSD.ORG Wed Dec 11 00:26:56 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2E21F2D for ; Wed, 11 Dec 2013 00:26:56 +0000 (UTC) Received: from mail-ea0-x22a.google.com (mail-ea0-x22a.google.com [IPv6:2a00:1450:4013:c01::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8BE4C1F09 for ; Wed, 11 Dec 2013 00:26:56 +0000 (UTC) Received: by mail-ea0-f170.google.com with SMTP id k10so2555224eaj.15 for ; Tue, 10 Dec 2013 16:26:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=z7oZgQlRMIXdBUMCirf1hKcXOa8pGMn0hB+L0u78rX4=; b=0QwF0vgaudNPZ7CQ6iz5kRQHjaDzlsICHJlEcdt3/TYNKTYT7tjMKYbie6KMq19wMU nJwHHoplDr10jJyXkZpeaVv5klzNzxCE0tChJdN3S5/elGxIdr7GFPQG8zmaxMtamwiw +WhaXEyO/h6wsBzSpJXdmeojl85KTG9uR8scGJRmqB1/tnXMfZ19RqceZf0MZmuDZLUk Y04AEbwJyWT7COoSrp5rJR9W7T1KGkCefe1PM7I1C0XfLTegu2Fk73wCUJoR2/ARfjvx yL18w3vO1IKpxRJzZxf4z4HJ3Gy9WcLOuPYSgz0AxR9Mj7PA18pWu7HdVL5y0aNfFwFz eHZA== MIME-Version: 1.0 X-Received: by 10.14.6.5 with SMTP id 5mr20530144eem.51.1386721614362; Tue, 10 Dec 2013 16:26:54 -0800 (PST) Received: by 10.14.2.66 with HTTP; Tue, 10 Dec 2013 16:26:54 -0800 (PST) In-Reply-To: References: <20131210234714.GQ1681@albert.catwhisker.org> Date: Tue, 10 Dec 2013 16:26:54 -0800 Message-ID: Subject: Re: Examples from www.dtracebook.com From: hiren panchasara To: freebsd-dtrace@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 00:26:57 -0000 $ sudo dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs); }' dtrace: description 'proc:::exec-success ' matched 1 probe CPU ID FUNCTION:NAME 5 48876 :exec-success /bin/sh /usr/bin/man ls 2 48876 :exec-success /sbin/sysctl -n hw.machine_arch 6 48876 :exec-success /sbin/sysctl -n hw.machine 0 48876 :exec-success /usr/bin/locale 7 48876 :exec-success /usr/bin/zcat /usr/share/man/man1/ls.1.gz 2 48876 :exec-success head -1 1 48876 :exec-success tbl 6 48876 :exec-success groff -S -P-h -Wall -mtty-char -man -Tascii -P-c 7 48876 :exec-success /usr/bin/zcat /usr/share/man/man1/ls.1.gz 3 48876 :exec-success less 3 48876 :exec-success troff -Wall -mtty-char -man -Tascii 7 48876 :exec-success grotty -h -c 6 48876 :exec-success top 7 48876 :exec-success ps awwux 7 48876 :exec-success iostat 5 48876 :exec-success vmstat 1 4 48876 :exec-success bash 4 48876 :exec-success whois 5 48876 :exec-success whoami 4 48876 :exec-success devinfo 4 48876 :exec-success dmesg 6 48876 :exec-success pciconf -lv I am getting interesting info only when "man" is executed and not for any other command. What does that tell me? How is man special? Other programs must also be doing exec(2), no? Thanks, Hiren From owner-freebsd-dtrace@FreeBSD.ORG Wed Dec 11 00:33:20 2013 Return-Path: Delivered-To: freebsd-dtrace@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 A045A213 for ; Wed, 11 Dec 2013 00:33:20 +0000 (UTC) Received: from mail-ie0-x230.google.com (mail-ie0-x230.google.com [IPv6:2607:f8b0:4001:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 636B21F87 for ; Wed, 11 Dec 2013 00:33:20 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id at1so9902410iec.35 for ; Tue, 10 Dec 2013 16:33:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=yQfgSJVTD6umanadJ+6HHIyvpjbYRustf6ovuSAViAI=; b=mc5F7lHlS+iGJ/MVhXVE5fwxdZCi8YFC2A0LO+oATVSPn4wTRBsou+eEbDGm25QHAQ DfGhLHlNKHw00z7HjFKPezvfh8qkPzigAt/SUJvXu09CvDEr/APgZbo+cJ5c2h6fPOip XSVyUaOMFUBwD+aAfH89hw7M7vzSTK0qXfgLAHpid0i04n7XMjK+6RPqag+lcdFtyaFP FdHvX5xbOP9CO9M/xjLKxUF9xl4OEAlM0KXABe5YuAir/nWMBnS7wMKNXn7wB9t8guEK eVG2s1WeTOfHSRCEQn1d29851eY4r9rYr9GpzlesbyxIK4297cN5MB535mIM94xpbIjr dkDg== X-Received: by 10.50.128.137 with SMTP id no9mr511603igb.36.1386721999317; Tue, 10 Dec 2013 16:33:19 -0800 (PST) Received: from raichu (198-84-185-216.cpe.teksavvy.com. [198.84.185.216]) by mx.google.com with ESMTPSA id v2sm6122237igz.3.2013.12.10.16.33.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Dec 2013 16:33:18 -0800 (PST) Sender: Mark Johnston Date: Tue, 10 Dec 2013 19:32:45 -0500 From: Mark Johnston To: hiren panchasara Subject: Re: Examples from www.dtracebook.com Message-ID: <20131211003245.GA4080@raichu> References: <20131210234714.GQ1681@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 00:33:20 -0000 On Tue, Dec 10, 2013 at 04:26:54PM -0800, hiren panchasara wrote: > $ sudo dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs); }' > dtrace: description 'proc:::exec-success ' matched 1 probe > CPU ID FUNCTION:NAME > 5 48876 :exec-success /bin/sh /usr/bin/man ls > 2 48876 :exec-success /sbin/sysctl -n hw.machine_arch > 6 48876 :exec-success /sbin/sysctl -n hw.machine > 0 48876 :exec-success /usr/bin/locale > 7 48876 :exec-success /usr/bin/zcat > /usr/share/man/man1/ls.1.gz > 2 48876 :exec-success head -1 > 1 48876 :exec-success tbl > 6 48876 :exec-success groff -S -P-h -Wall > -mtty-char -man -Tascii -P-c > 7 48876 :exec-success /usr/bin/zcat > /usr/share/man/man1/ls.1.gz > 3 48876 :exec-success less > 3 48876 :exec-success troff -Wall -mtty-char > -man -Tascii > 7 48876 :exec-success grotty -h -c > > > 6 48876 :exec-success top > 7 48876 :exec-success ps awwux > 7 48876 :exec-success iostat > 5 48876 :exec-success vmstat 1 > 4 48876 :exec-success bash > 4 48876 :exec-success whois > 5 48876 :exec-success whoami > 4 48876 :exec-success devinfo > 4 48876 :exec-success dmesg > 6 48876 :exec-success pciconf -lv > > I am getting interesting info only when "man" is executed and not for > any other command. What does that tell me? How is man special? Other > programs must also be doing exec(2), no? /usr/bin/man is a shell script. You'll see similar output for any executable that starts with a shebang. From owner-freebsd-dtrace@FreeBSD.ORG Wed Dec 11 00:50:50 2013 Return-Path: Delivered-To: freebsd-dtrace@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 3860B609 for ; Wed, 11 Dec 2013 00:50:50 +0000 (UTC) Received: from sasl.smtp.pobox.com (a-pb-sasl-quonix.pobox.com [208.72.237.25]) by mx1.freebsd.org (Postfix) with ESMTP id E4F3410BA for ; Wed, 11 Dec 2013 00:50:49 +0000 (UTC) Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 3929CF291; Tue, 10 Dec 2013 19:50:53 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date :message-id:from:to:cc:subject:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=sasl; bh=3s6b22+1fMjhbOBO+YIOB0yOlM0=; b=G7speBcBqFW/bGbvpicMX327cdnW PySaSAXEItqlybtGj/t6Y4ThI6nQ5TcCUJ7WNC2O9TZYR+HxGFmHZpo5+t7bMt7p hr79syVooW+x9UwINXVRq2JufZ/czo1hnCYRkCm5frWlDWFf3qIK82LIKrZ4ERM9 GRHlThQUL3Qe3aY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=date:message-id :from:to:cc:subject:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=J8cZRr uk4dcKin22mlmYauTi3k71l5A4rjBznKYxRBUEfEJdF+9NHN+h6T99+PZA8PVgJZ 6jXrLCmAnOdndEw5dRocmCHHGeGAeNhbJLRTM7lsMA+cpT09RfLbV51knAfAwKo1 4EX8XQzrcwEkgkXtHViuS4Xtzk9HnozIJIDUw= Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 32406F290; Tue, 10 Dec 2013 19:50:53 -0500 (EST) Received: from bmach.nederware.nl (unknown [27.252.229.228]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPA id 776B9F28F; Tue, 10 Dec 2013 19:50:52 -0500 (EST) Received: from quadrio.nederware.nl (quadrio.nederware.nl [192.168.33.13]) by bmach.nederware.nl (Postfix) with ESMTP id 805D33093D; Wed, 11 Dec 2013 13:50:40 +1300 (NZDT) Received: from quadrio.nederware.nl (quadrio.nederware.nl [127.0.0.1]) by quadrio.nederware.nl (Postfix) with ESMTP id 807654A11BFE; Wed, 11 Dec 2013 13:50:39 +1300 (NZDT) Date: Wed, 11 Dec 2013 13:50:39 +1300 Message-ID: <87iouwxlb4.wl%berend@pobox.com> From: Berend de Boer To: hiren panchasara Subject: Re: Examples from www.dtracebook.com In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/24.3 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Xplain Technology Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Wed_Dec_11_13:50:38_2013-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: 48F68532-61FE-11E3-9708-873F0E5B5709-48001098!a-pb-sasl-quonix.pobox.com Cc: freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 00:50:50 -0000 --pgp-sign-Multipart_Wed_Dec_11_13:50:38_2013-1 Content-Type: text/plain; charset=US-ASCII >>>>> "hiren" == hiren panchasara writes: hiren> fds has not yet been declared or assigned hiren> This is on FreeBSD -head. Yeah. An extremely useful dtrace, the first one everyone will try, and FreeBSD doesn't support it. Not sure what FreeBSD supports in dtrace, I haven't had much luck. Hopefully it gets better over time, now its more a feature that disappoints people I would say. -- All the best, Berend de Boer --pgp-sign-Multipart_Wed_Dec_11_13:50:38_2013-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit Content-Description: OpenPGP Digital Signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABCAAGBQJSp7beAAoJEKOfeD48G3g5OTkP/jISUaZENZ4wMu6xNrHqY9EL D2aZoUVjIM4ef1z60ELY6uOyQxI5wWsQ3n/hiGJJ7inasczDrTgvnBTmTa/bC8HZ M5ZorhsEya2IX7GkAZmY2bCJWV+Iws1xpkM48XsWtLQs9a9/jWuRchATDOBKQ4DT zIWO6YQIuaaYOeeZFtQuyLsPC3BZfu8AQsA1xqN/HkAlxKmGpXt50OwUOqP6Lhwe q0m6BehiqW1i7tjUVsZ7VCHNIaU21UETEctwOKFMorNht2LFmHeYRp9Tss0ANIKU 88od5PGFQgPXnwVbXjOI/SV1eNGAG0FKVRpTAgOHEKkISMIz9LN4newY8qrRROQn 6zx9M2RvAxHbKO6VEg3GfereHj6yVWJbTCHG7aUoqEblOqSSgokknjtLoyfPAj0M Rvz/8jnEq8DBv5MCpCaOqwbEBgAvzYuELG6nHlbzsAeVq9Xvzbv77OMrBSSB5noz TjNiOCMO0vRi/EEtCzB3yt1BBhwBFPLS955vu7Dhg1nff4fFTIj91iEViqMedpJd arbwR6ZDwLNSDLR0l4sCgidHQmekNHmca3O5ZGYKb2oJXgwxTy4grVwp96HnuP4U 35Pl1kdOjoAVuxvhyVI0cMgjeYDc27JCdnQuRn2Y5sIs46jBNTYvCcrq4WJ8KlF2 5JDXt7bgeyvgWeThX3jP =jusK -----END PGP SIGNATURE----- --pgp-sign-Multipart_Wed_Dec_11_13:50:38_2013-1-- From owner-freebsd-dtrace@FreeBSD.ORG Wed Dec 11 00:54:38 2013 Return-Path: Delivered-To: freebsd-dtrace@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 C7F4F740; Wed, 11 Dec 2013 00:54:38 +0000 (UTC) Received: from mail-ee0-x233.google.com (mail-ee0-x233.google.com [IPv6:2a00:1450:4013:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 39C7D10E1; Wed, 11 Dec 2013 00:54:38 +0000 (UTC) Received: by mail-ee0-f51.google.com with SMTP id b15so2573023eek.10 for ; Tue, 10 Dec 2013 16:54:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AMmvVD36EzUJ4qTfW6TARCww7IhpHJO2UePLFqk7iYI=; b=Ph90dLr47JupavcXeGYF3pD3zG+YI7j7pMpbQlcnG/+XNJdeLu8r11EamkMJzu1obr FmIy0jpvbIpX454a/LbIE+gjrbGvOvXNkh3NBE6YqH7PyfmAFHAeSj9IocJwIu1vJ1tN jNAv9wNrkAzYp+eFv9+9QES3BrhIqGw++XftjdK5iOivsB1Ib8JTYw8ogcehl0KKO5Cw WhLDLFevwJtnlJ94iR3rn5XkSUAa9cV5k14VkAZTuFxBLAPKU2F17p6h+CN8VWZqmfOk Ro+kdwg7uktC5Mu6YtOP9DPDU9Andk/lQX3pzaxGQdTFCqPT8DI97CKSGiQjGNCLSoZ9 yY8Q== MIME-Version: 1.0 X-Received: by 10.15.110.8 with SMTP id cg8mr20986236eeb.42.1386723276686; Tue, 10 Dec 2013 16:54:36 -0800 (PST) Received: by 10.14.2.66 with HTTP; Tue, 10 Dec 2013 16:54:36 -0800 (PST) In-Reply-To: <20131211003245.GA4080@raichu> References: <20131210234714.GQ1681@albert.catwhisker.org> <20131211003245.GA4080@raichu> Date: Tue, 10 Dec 2013 16:54:36 -0800 Message-ID: Subject: Re: Examples from www.dtracebook.com From: hiren panchasara To: Mark Johnston Content-Type: text/plain; charset=UTF-8 Cc: freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 00:54:38 -0000 On Tue, Dec 10, 2013 at 4:32 PM, Mark Johnston wrote: > On Tue, Dec 10, 2013 at 04:26:54PM -0800, hiren panchasara wrote: >> $ sudo dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs); }' >> dtrace: description 'proc:::exec-success ' matched 1 probe >> CPU ID FUNCTION:NAME >> 5 48876 :exec-success /bin/sh /usr/bin/man ls >> 2 48876 :exec-success /sbin/sysctl -n hw.machine_arch >> 6 48876 :exec-success /sbin/sysctl -n hw.machine >> 0 48876 :exec-success /usr/bin/locale >> 7 48876 :exec-success /usr/bin/zcat >> /usr/share/man/man1/ls.1.gz >> 2 48876 :exec-success head -1 >> 1 48876 :exec-success tbl >> 6 48876 :exec-success groff -S -P-h -Wall >> -mtty-char -man -Tascii -P-c >> 7 48876 :exec-success /usr/bin/zcat >> /usr/share/man/man1/ls.1.gz >> 3 48876 :exec-success less >> 3 48876 :exec-success troff -Wall -mtty-char >> -man -Tascii >> 7 48876 :exec-success grotty -h -c >> >> >> 6 48876 :exec-success top >> 7 48876 :exec-success ps awwux >> 7 48876 :exec-success iostat >> 5 48876 :exec-success vmstat 1 >> 4 48876 :exec-success bash >> 4 48876 :exec-success whois >> 5 48876 :exec-success whoami >> 4 48876 :exec-success devinfo >> 4 48876 :exec-success dmesg >> 6 48876 :exec-success pciconf -lv >> >> I am getting interesting info only when "man" is executed and not for >> any other command. What does that tell me? How is man special? Other >> programs must also be doing exec(2), no? > > /usr/bin/man is a shell script. You'll see similar output for any > executable that starts with a shebang. Thanks Mark for responding but that doesn't seem true. I tried apropos(1) without luck. cheers, Hiren From owner-freebsd-dtrace@FreeBSD.ORG Wed Dec 11 00:57:03 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B76D8770 for ; Wed, 11 Dec 2013 00:57:03 +0000 (UTC) Received: from mail-ea0-x232.google.com (mail-ea0-x232.google.com [IPv6:2a00:1450:4013:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4F86E10F0 for ; Wed, 11 Dec 2013 00:57:03 +0000 (UTC) Received: by mail-ea0-f178.google.com with SMTP id d10so2644677eaj.9 for ; Tue, 10 Dec 2013 16:57:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mN022atB9Alyj+GG4SDFrB9oAp3EmSxq2j6aEHp9ixw=; b=p938CgSh9yBjlDqbZkH63OxuisVSBn0VIv8hcpZQOzRgwcJx7Uo5EdnOA2McC+4M3W i0K66Tvaetxa2IVWgjabNfEqQjXMl1f9CPrNHOCA7junXg9J6Uu2Xx4y57Vi4dRhtZVS nFGLGwFA+Mwpw+Rr9OuGuB3ITIIObr82vRugILIRWe3/YmhSgUheJSlFE/gAO90fTN7/ drBIk/yoKo+dnjx8HUJCWUJDcBqL8hzyUDSYxK2kGzuwtM0fwHr5ORumE3qOb9laSDmY fHZpjM4NaIZWVJyQXQPk6FDwZjN5uiwzI2YLLaxRbwSyGLlkxdAz/9GUwgzy8FfbRmRv HL0w== MIME-Version: 1.0 X-Received: by 10.14.105.7 with SMTP id j7mr11160282eeg.95.1386723421798; Tue, 10 Dec 2013 16:57:01 -0800 (PST) Received: by 10.14.2.66 with HTTP; Tue, 10 Dec 2013 16:57:01 -0800 (PST) In-Reply-To: <87iouwxlb4.wl%berend@pobox.com> References: <87iouwxlb4.wl%berend@pobox.com> Date: Tue, 10 Dec 2013 16:57:01 -0800 Message-ID: Subject: Re: Examples from www.dtracebook.com From: hiren panchasara To: Berend de Boer Content-Type: text/plain; charset=UTF-8 Cc: freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 00:57:03 -0000 On Tue, Dec 10, 2013 at 4:50 PM, Berend de Boer wrote: >>>>>> "hiren" == hiren panchasara writes: > > hiren> fds has not yet been declared or assigned > > hiren> This is on FreeBSD -head. > > Yeah. An extremely useful dtrace, the first one everyone will try, and > FreeBSD doesn't support it. > > Not sure what FreeBSD supports in dtrace, I haven't had much > luck. Hopefully it gets better over time, now its more a feature that > disappoints people I would say. Nah, I do not agree. I know it's not perfect but we have a lot of useful things in the tree right now, IMHO. cheers, Hiren From owner-freebsd-dtrace@FreeBSD.ORG Wed Dec 11 01:00:46 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C7C88A1 for ; Wed, 11 Dec 2013 01:00:46 +0000 (UTC) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4366E1151 for ; Wed, 11 Dec 2013 01:00:46 +0000 (UTC) Received: by mail-ie0-f170.google.com with SMTP id qd12so10019604ieb.15 for ; Tue, 10 Dec 2013 17:00:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=pIqZYQIuwgI8wnsvnNf1lIU1mTAw+xStgDKwx/RlKso=; b=jXq+QYf7WY0zq0Th7hGuuMMMkAGqJRYPBAtwUHYvGQe/85KeujkA4/mmSFZe+e59cQ vx50YJq7R+4NP6/qPI1uTpPZMBVOgdyVC/Q5TmCknzyv8gCji+aEHzVnoj5zOeGGZCi4 iSXxDW+t0uyNYLr/GQFU2XkAFygb4bwtYUg12IJrgppUcwLbiNUsoR9gbLgIkdnE3XfG GmNleaUA+IHuczcNp91rjK4xtqPb9RbfvJg6agXr3jqE+xj1IUhzFvzorLUS0/DJID8a Fv9VTMO6EIk6XOlDcEtXEw4jijVNRqOMcZZB8JB2tUVvYNH4dFmUL2FTQBUUfj6pMzxq MeJg== X-Received: by 10.50.61.232 with SMTP id t8mr586587igr.32.1386723645575; Tue, 10 Dec 2013 17:00:45 -0800 (PST) Received: from raichu (198-84-185-216.cpe.teksavvy.com. [198.84.185.216]) by mx.google.com with ESMTPSA id w4sm6233033igb.5.2013.12.10.17.00.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Dec 2013 17:00:45 -0800 (PST) Sender: Mark Johnston Date: Tue, 10 Dec 2013 20:00:42 -0500 From: Mark Johnston To: hiren panchasara Subject: Re: Examples from www.dtracebook.com Message-ID: <20131211010042.GB4080@raichu> References: <20131210234714.GQ1681@albert.catwhisker.org> <20131211003245.GA4080@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 01:00:46 -0000 On Tue, Dec 10, 2013 at 04:54:36PM -0800, hiren panchasara wrote: > On Tue, Dec 10, 2013 at 4:32 PM, Mark Johnston wrote: > > On Tue, Dec 10, 2013 at 04:26:54PM -0800, hiren panchasara wrote: > >> $ sudo dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs); }' > >> dtrace: description 'proc:::exec-success ' matched 1 probe > >> CPU ID FUNCTION:NAME > >> 5 48876 :exec-success /bin/sh /usr/bin/man ls > >> 2 48876 :exec-success /sbin/sysctl -n hw.machine_arch > >> 6 48876 :exec-success /sbin/sysctl -n hw.machine > >> 0 48876 :exec-success /usr/bin/locale > >> 7 48876 :exec-success /usr/bin/zcat > >> /usr/share/man/man1/ls.1.gz > >> 2 48876 :exec-success head -1 > >> 1 48876 :exec-success tbl > >> 6 48876 :exec-success groff -S -P-h -Wall > >> -mtty-char -man -Tascii -P-c > >> 7 48876 :exec-success /usr/bin/zcat > >> /usr/share/man/man1/ls.1.gz > >> 3 48876 :exec-success less > >> 3 48876 :exec-success troff -Wall -mtty-char > >> -man -Tascii > >> 7 48876 :exec-success grotty -h -c > >> > >> > >> 6 48876 :exec-success top > >> 7 48876 :exec-success ps awwux > >> 7 48876 :exec-success iostat > >> 5 48876 :exec-success vmstat 1 > >> 4 48876 :exec-success bash > >> 4 48876 :exec-success whois > >> 5 48876 :exec-success whoami > >> 4 48876 :exec-success devinfo > >> 4 48876 :exec-success dmesg > >> 6 48876 :exec-success pciconf -lv > >> > >> I am getting interesting info only when "man" is executed and not for > >> any other command. What does that tell me? How is man special? Other > >> programs must also be doing exec(2), no? > > > > /usr/bin/man is a shell script. You'll see similar output for any > > executable that starts with a shebang. > > Thanks Mark for responding but that doesn't seem true. > > I tried apropos(1) without luck. I get the following with "apropos dtrace": mark@raichu: ~ $ sudo dtrace -n 'proc:::exec-success {trace(curpsinfo->pr_psargs);}' Password: dtrace: description 'proc:::exec-success ' matched 1 probe CPU ID FUNCTION:NAME 4 35852 :exec-success /bin/sh /usr/bin/apropos dtrace 2 35852 :exec-success grep -Ehi -- dtrace /usr/share/man/whatis /usr/local/man/whatis /usr/share/openssl/man/whatis /usr/local/lib/perl5/5.14/man/whatis /usr/local/lib/perl5/5.14/perl/man/whatis 2 35852 :exec-success /usr/bin/less -i I don't really know what you mean by "interesting info." The other programs you ran (whoami, pciconf, dmesg, devinfo) above don't call execv(). From owner-freebsd-dtrace@FreeBSD.ORG Wed Dec 11 01:10:10 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DCDDB46; Wed, 11 Dec 2013 01:10:10 +0000 (UTC) Received: from mail-ea0-x234.google.com (mail-ea0-x234.google.com [IPv6:2a00:1450:4013:c01::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C0A1E11CC; Wed, 11 Dec 2013 01:10:09 +0000 (UTC) Received: by mail-ea0-f180.google.com with SMTP id f15so2593192eak.11 for ; Tue, 10 Dec 2013 17:10:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IcYOMmry++KAwZRE0b4NUzsyvnnXGkvdhEiduUo31oQ=; b=tSlqTrFaSq3TeaLMS7cF0JqW/Rb8V0HSkb/DxD3zhS0CGOumIAc4HDk8MAg375UPE/ U0sK72jyoUP1RF/nDymQMmu0rjenNTS8tPMgbhptGd2qyaYAYe/ja/ZyugVk3T3APM8L 4KAStADkee0FMctn/Rle+PqTfJx9bfG3zagVgSlHay+9UIqw3ian6P0wFG7PtTXWWn+Q U+U3nKoZ9M0rI1hgJhWiMTjCkMETKaMhlBVrdKKKiQCJRhr5sygBjNoiwfnde6iLoXe7 9+p9n4fOr+lig5l9fc2lMtvaT5J+IBAa8uylU3igdL4coCyfo400PMAXCkfd2dyQ21xG m7YQ== MIME-Version: 1.0 X-Received: by 10.14.150.5 with SMTP id y5mr15504601eej.73.1386724207999; Tue, 10 Dec 2013 17:10:07 -0800 (PST) Received: by 10.14.2.66 with HTTP; Tue, 10 Dec 2013 17:10:07 -0800 (PST) In-Reply-To: <20131211010042.GB4080@raichu> References: <20131210234714.GQ1681@albert.catwhisker.org> <20131211003245.GA4080@raichu> <20131211010042.GB4080@raichu> Date: Tue, 10 Dec 2013 17:10:07 -0800 Message-ID: Subject: Re: Examples from www.dtracebook.com From: hiren panchasara To: Mark Johnston Content-Type: text/plain; charset=UTF-8 Cc: freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 01:10:10 -0000 On Tue, Dec 10, 2013 at 5:00 PM, Mark Johnston wrote: > On Tue, Dec 10, 2013 at 04:54:36PM -0800, hiren panchasara wrote: >> On Tue, Dec 10, 2013 at 4:32 PM, Mark Johnston wrote: >> > On Tue, Dec 10, 2013 at 04:26:54PM -0800, hiren panchasara wrote: >> >> $ sudo dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs); }' >> >> dtrace: description 'proc:::exec-success ' matched 1 probe >> >> CPU ID FUNCTION:NAME >> >> 5 48876 :exec-success /bin/sh /usr/bin/man ls >> >> 2 48876 :exec-success /sbin/sysctl -n hw.machine_arch >> >> 6 48876 :exec-success /sbin/sysctl -n hw.machine >> >> 0 48876 :exec-success /usr/bin/locale >> >> 7 48876 :exec-success /usr/bin/zcat >> >> /usr/share/man/man1/ls.1.gz >> >> 2 48876 :exec-success head -1 >> >> 1 48876 :exec-success tbl >> >> 6 48876 :exec-success groff -S -P-h -Wall >> >> -mtty-char -man -Tascii -P-c >> >> 7 48876 :exec-success /usr/bin/zcat >> >> /usr/share/man/man1/ls.1.gz >> >> 3 48876 :exec-success less >> >> 3 48876 :exec-success troff -Wall -mtty-char >> >> -man -Tascii >> >> 7 48876 :exec-success grotty -h -c >> >> >> >> >> >> 6 48876 :exec-success top >> >> 7 48876 :exec-success ps awwux >> >> 7 48876 :exec-success iostat >> >> 5 48876 :exec-success vmstat 1 >> >> 4 48876 :exec-success bash >> >> 4 48876 :exec-success whois >> >> 5 48876 :exec-success whoami >> >> 4 48876 :exec-success devinfo >> >> 4 48876 :exec-success dmesg >> >> 6 48876 :exec-success pciconf -lv >> >> >> >> I am getting interesting info only when "man" is executed and not for >> >> any other command. What does that tell me? How is man special? Other >> >> programs must also be doing exec(2), no? >> > >> > /usr/bin/man is a shell script. You'll see similar output for any >> > executable that starts with a shebang. >> >> Thanks Mark for responding but that doesn't seem true. >> >> I tried apropos(1) without luck. > > I get the following with "apropos dtrace": > > mark@raichu: ~ $ sudo dtrace -n 'proc:::exec-success {trace(curpsinfo->pr_psargs);}' > Password: > dtrace: description 'proc:::exec-success ' matched 1 probe > CPU ID FUNCTION:NAME > 4 35852 :exec-success /bin/sh /usr/bin/apropos dtrace > 2 35852 :exec-success grep -Ehi -- dtrace /usr/share/man/whatis /usr/local/man/whatis /usr/share/openssl/man/whatis /usr/local/lib/perl5/5.14/man/whatis /usr/local/lib/perl5/5.14/perl/man/whatis > 2 35852 :exec-success /usr/bin/less -i > > I don't really know what you mean by "interesting info." The other > programs you ran (whoami, pciconf, dmesg, devinfo) above don't call > execv(). My bad. I am now seeing the o/p what you are seeing above. "interesting info" == exec calls :p Thanks a lot, Hiren From owner-freebsd-dtrace@FreeBSD.ORG Wed Dec 11 03:28:38 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC8A93D4 for ; Wed, 11 Dec 2013 03:28:38 +0000 (UTC) Received: from albert.catwhisker.org (mx.catwhisker.org [198.144.209.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 67C781D7C for ; Wed, 11 Dec 2013 03:28:38 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.7/8.14.7) with ESMTP id rBB3Sbio020132 for ; Tue, 10 Dec 2013 19:28:37 -0800 (PST) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.7/8.14.7/Submit) id rBB3Sb8i020131 for freebsd-dtrace@freebsd.org; Tue, 10 Dec 2013 19:28:37 -0800 (PST) (envelope-from david) Date: Tue, 10 Dec 2013 19:28:37 -0800 From: David Wolfskill To: freebsd-dtrace@freebsd.org Subject: Re: Examples from www.dtracebook.com Message-ID: <20131211032837.GR1681@albert.catwhisker.org> References: <87iouwxlb4.wl%berend@pobox.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/Isdj7O9hWi8F9Bn" Content-Disposition: inline In-Reply-To: <87iouwxlb4.wl%berend@pobox.com> User-Agent: Mutt/1.5.22 (2013-10-16) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 03:28:38 -0000 --/Isdj7O9hWi8F9Bn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 11, 2013 at 01:50:39PM +1300, Berend de Boer wrote: > ... > Not sure what FreeBSD supports in dtrace, I haven't had much > luck. Hopefully it gets better over time, now its more a feature that > disappoints people I would say. > ... g1-227(9.2-S)[3] uname -a FreeBSD g1-227.catwhisker.org 9.2-STABLE FreeBSD 9.2-STABLE #615 r259158M/= 259164:902504: Tue Dec 10 05:37:04 PST 2013 root@g1-227.catwhisker.org:= /usr/obj/usr/src/sys/CANARY i386 g1-227(9.2-S)[4] sudo dtrace -l | awk '{print $2}' | sort | uniq -c | awk '= {printf("%7d %s\n", $1, $2)}' | sed -e 's/^ 1 PROVIDER$/ Count Provid= er/' Count Provider 2 callout_execute 676 dtmalloc 3 dtrace 47246 fbt 4 io 511 linuxulator 29 lockstat 3 mac 219 mac_framework 172 nfscl 86 nfsclient 2 priv 15 proc 13 profile 18 sched 12 sctp 1048 syscall 152 vfs g1-227(9.2-S)[5]=20 There are more in stable/10, and more still in head. Yes, it would be cool if we supported the fds array; perhaps with some work we will. Peace, david --=20 David H. Wolfskill david@catwhisker.org Taliban: Evil cowards with guns afraid of truth from a 14-year old girl. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --/Isdj7O9hWi8F9Bn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQJ8BAEBCgBmBQJSp9vkXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RThEMDY4QTIxMjc1MDZFRDIzODYzRTc4 QTY3RjlDOERFRjQxOTNCAAoJEIpn+cje9Bk7LykQAIvKDdDSDwLJ9nfj7sKam2DJ MXPTiDEOs5NehiodCJGS+tf/LxYFRKfl1ws0rLguxFOcb7cIBwJsw+YEa321pWng WiBvzyoftRjFkyh6rFLqaH9kzUfwpm+meIMcQW8vHRKZbeEidwwBYiFmuw0BM4HT Am5SOMw1WMPn/+WgtRmqxRKr6mPkmYwDe7XSSHtqIcwexw+IqKPUH58F+T1MAhM5 wbLeYvaC/05lC+STOBWb56maaO9PyxbQTThK1VC289y+Utid+nRGlIrLcYeKmF33 f2OndfzTLqQkym7Rawiiaf60Hh66AkPMVZNTW3bEjNQnWhYN2PlOCrJKwRwey+9/ PFjKRIu594DioH/bPoWC21WzfXnEnOJ+ioOomjH+mSfkfMx5ZNtDF9ePVTVhHNlM 9asaVm2y43YB7p83Zkgi5q1xrKk7ygNMQY/Lyk8VS3Lp6CQvVQiVzNG9tTKLqzlz OLgXqeuqScfnc8OM2ZX6N5ZMtnSpirDXTQjLkRamLcPzI8K4zjClNWdlcW7+9iZs /czH7kaPkrbblECZd2KrrCsAapCGq3iAdV1vF0Xn6zJS2OMjPWDvMyfJot1cMCVC 9tTEjZk30+JV15YJgN2cJ/krHcm1q87Gd377nx4CF8ioyl7zC71tFmRskebbE+RH lWtue76slprteHqL7PMb =XhOj -----END PGP SIGNATURE----- --/Isdj7O9hWi8F9Bn-- From owner-freebsd-dtrace@FreeBSD.ORG Fri Dec 13 07:17:08 2013 Return-Path: Delivered-To: dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AF80F2; Fri, 13 Dec 2013 07:17:08 +0000 (UTC) Received: from mail-ve0-x22b.google.com (mail-ve0-x22b.google.com [IPv6:2607:f8b0:400c:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E70871AF7; Fri, 13 Dec 2013 07:17:04 +0000 (UTC) Received: by mail-ve0-f171.google.com with SMTP id pa12so1092062veb.2 for ; Thu, 12 Dec 2013 23:17:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=nua/rjkqozyg4nWi+PyKxqeN/E/5pddKnhd+9L9xLsQ=; b=pefpmrUC3AjFppRfMVsR25Xz18YZHKHCrOFLeNU6+zC3eW7RAzTIiUCOiw+0zoIqyx btpUUYO/RgMVBIq0kJ1otBGfEfk6F1WrJm0bKfpYjCoiHfafT8XhcfPN/so06eT5fLuU OMhkCSBE58mizZ88RoK6VtnYzVEA2rJKtDtcFWYt8GdqmLwWqAek87fxUit5vilUko/B MFbhYi/lzzF83kqT79h5appLIlGWUDswF9SLTk4ex69t2TJsJBSiMTeitp9PkIt9pogu 9yqKAzXBrHJ8IYC76DincvFp5jmVy0zATX0Z7o9YmbZr2rygIY/aFIy5AU9H+8gEY1Jx F6zg== MIME-Version: 1.0 X-Received: by 10.52.26.77 with SMTP id j13mr404312vdg.33.1386919024021; Thu, 12 Dec 2013 23:17:04 -0800 (PST) Received: by 10.220.144.199 with HTTP; Thu, 12 Dec 2013 23:17:03 -0800 (PST) Date: Fri, 13 Dec 2013 08:17:03 +0100 Message-ID: Subject: [CFT] Use vmem in dtrace From: Mike Ma To: "dtrace@freebsd.org" , Pedro Giffuni Content-Type: multipart/mixed; boundary=20cf307d045ac265fb04ed653ff1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 07:17:08 -0000 --20cf307d045ac265fb04ed653ff1 Content-Type: text/plain; charset=ISO-8859-1 Hi there, I'm a GSoC student this year, and Pedro guided me to dtrace recently. I'm sending my patch for a vmem task listed in the TODO list (12th item), as there is vmem subsystem in FreeBSD 10/11 available now. Basically, it is to revert changes from this patch http://lists.freebsd.org/pipermail/p4-projects/2008-January/023466.html And the main difference is that vmem_create and vmem_alloc take different number of parameters on FreeBSD. I did run dtrace testsuite on my own machine. And I hope someone here can try my patch. Any comments are appreciated. Thanks. Cheers, Mike -- Cheers, Mike --20cf307d045ac265fb04ed653ff1 Content-Type: text/plain; charset=US-ASCII; name="dtrace_vmem.diff" Content-Disposition: attachment; filename="dtrace_vmem.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hp2p9e040 SW5kZXg6IHN5cy9jZGRsL2NvbnRyaWIvb3BlbnNvbGFyaXMvdXRzL2NvbW1vbi9kdHJhY2UvZHRy YWNlLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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owner-freebsd-dtrace@FreeBSD.ORG Fri Dec 13 21:05:18 2013 Return-Path: Delivered-To: dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D382F35D for ; Fri, 13 Dec 2013 21:05:18 +0000 (UTC) Received: from nm9-vm0.bullet.mail.bf1.yahoo.com (nm9-vm0.bullet.mail.bf1.yahoo.com [98.139.213.154]) by mx1.freebsd.org (Postfix) with SMTP id 4A4A31DAD for ; Fri, 13 Dec 2013 21:05:17 +0000 (UTC) Received: from [66.196.81.171] by nm9.bullet.mail.bf1.yahoo.com with NNFMP; 13 Dec 2013 21:05:11 -0000 Received: from [98.139.211.201] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 13 Dec 2013 21:05:11 -0000 Received: from [127.0.0.1] by smtp210.mail.bf1.yahoo.com with NNFMP; 13 Dec 2013 21:05:11 -0000 X-Yahoo-Newman-Id: 650107.12465.bm@smtp210.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: OKXHqacVM1mJ9XGXKRnto6ANuasQyEVX61bHd.vEOLUZ0iN FdzX.2DCbwKBjYxokSdj9A0Y9fA07jL5qrD6j044HbMbrsfoxOnMsQgoqZTp D1FIYKD52qczz6fsxF.w8UAlyA4l3wJIpWzvzQmUaoZ7gcdO7Q.jc4Y2TeAP dIfffOe1tFg._cQfCHfeIImbfIQuIjuPZNXzVW4C7yc0URX76_vG961TAwdZ 3kcUQp99aFq1J21lFbuApV9QNmUw.nLiSSAzRXnK1wp7RbLOr9gqb6u2easF hiNPP7SRMsltp_VWCbHw6sdUPh8BkLWnmoYq9TKQxahNtfxxss4bGAL2eGVL FVXRYyAe0BZWFA5R3tDKECDgTV6ELFQo63ZCYhdfGB4ML3vDT3LoW3FlT3ah qCgd5sIY1cIFvEX4dNJnuaV__PSvjjQTYtRA6VMNSDgQQr91XrGMMjtPeC37 0a45hthXwntUIuXLCaNS2wp4qXof7wCFSlkkN3oOhSYfjjSKH7DaW3RnWP2F LLh3DR1aPwPucLjgFdtR3sSA6CBBVW14XIACEGRIN3P5G6lRCrgMLrrso8eJ JNx0Xd.5Or3BG6Bibi5MCOavOxKHblEdmopz94w7R0djTKP9N06sQojCzI9D Cx0jRR5DNatIYFOsLD9RJheOgkMJqZivcAu6__rS.APQtfOyE X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with plain [98.139.211.125]) by smtp210.mail.bf1.yahoo.com with SMTP; 13 Dec 2013 13:05:11 -0800 PST Message-ID: <52AB7685.7080803@FreeBSD.org> Date: Fri, 13 Dec 2013 16:05:09 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Mike Ma , "dtrace@freebsd.org" Subject: Re: [CFT] Use vmem in dtrace References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 21:05:18 -0000 Hi Mike; On 13.12.2013 02:17, Mike Ma wrote: > Hi there, > > I'm a GSoC student this year, and Pedro guided me to dtrace recently. > > I'm sending my patch for a vmem task listed in the TODO list (12th > item), as there is vmem subsystem in FreeBSD 10/11 available now. > Basically, it is to revert changes from this patch > http://lists.freebsd.org/pipermail/p4-projects/2008-January/023466.html > And the main difference is that vmem_create and vmem_alloc take > different number of parameters on FreeBSD. > > I did run dtrace testsuite on my own machine. > And I hope someone here can try my patch. > > Any comments are appreciated. I did some purely cosmetic cleanups (tabs and use use of the #defines) and placed the patch here: http://people.freebsd.org/~pfg/patches/dtrace/dtrace_vmem.diff However, on sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c This chunk looks suspicious: @@ -13160,10 +13160,10 @@ state = kmem_zalloc(sizeof(dtrace_state_t), KM_SLEEP); #endif +#if defined(sun) state->dts_epid = DTRACE_EPIDNONE + 1; (void) snprintf(c, sizeof (c), "dtrace_aggid_%d", m); -#if defined(sun) state->dts_aggid_arena = vmem_create(c, (void *)1, UINT32_MAX, 1, NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER); _____ Any reason for removing the assignment and the snprintf out of FreeBSD and into sun-specific code? FWIW, SUN's code also uses dtrace_minor but it seems like it may be for Solaris driver specific code. Not sure if it's worth investigating. Regards, Pedro.