Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Oct 2011 16:24:29 +0200
From:      Fabian Keil <freebsd-listen@fabiankeil.de>
To:        freebsd-current@freebsd.org
Subject:   Re: A patch for a bug in the dtrace command...
Message-ID:  <20111008162429.5bc23116@fabiankeil.de>
In-Reply-To: <3F00228B-857B-472E-926B-9BEFE9B3557A@freebsd.org>
References:  <3F00228B-857B-472E-926B-9BEFE9B3557A@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
George Neville-Neil <gnn@freebsd.org> 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 FreeBSD signals work.
> For example, this one liner will give no output:
> 
> sudo dtrace -n 'syscall:::entry { @[execname] = 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:
> 
> dtrace -n 'syscall:::entry { @[execname] = quantize(arg0); }'
> dtrace: description 'syscall:::entry ' matched 1028 probes
> ^C
> 
>   nrpe2                                             
>            value  ------------- Distribution ------------- count    
>                2 |                                         0        
>                4 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12       
>                8 |                                         0        
> 
>   sshd                                              
>            value  ------------- Distribution ------------- count    
>                0 |                                         0        
>                1 |@@@@@@@@@@                               5        
>                2 |@@@@@@@@@@@@@@                           7        
>                4 |                                         0        
>                8 |@@@@@@@@@@@@@@@@                         8        
>               16 |                                         0        
> 
> etc.
> 
> 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

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk6QXSUACgkQBYqIVf93VJ2p6wCeN6/v4BLUUcTYkSlHNvRHrYGh
yf4AoK6VD0R8a3ElZQJ+HrMJsWx3yWVi
=Qonf
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111008162429.5bc23116>