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.