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