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.