Re: [dtrace-discuss] quotes in command arguments (pid provider)

2011-09-02 Thread Vladimir Kotal
On 09/01/11 18:13, Adam Leventhal wrote: Hey Vladimir, This is a bug in the way that DTrace composes arguments to the command it executes as a result of the -c option. http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/dtrace/dtrace.c#274 Oh, it's using strtok() with \f\n\r\t\v as

Re: [dtrace-discuss] compilation, types and include files

2011-04-27 Thread Vladimir Kotal
On 04/14/11 07:35 PM, Adam Leventhal wrote: #!/usr/sbin/dtrace -I. -Cs The kernel only picks up one argument from the #! line. You can use #pragma incdir instead of the -I option. I can't get this to work. If I remove the include line and header from state.d and run it like this: dtrace

Re: [dtrace-discuss] tracemem() output on single line

2011-04-14 Thread Vladimir Kotal
On 04/13/11 06:18 PM, Adam Leventhal wrote: snip There's nothing particularly convenient, but you could just print out your array by hand: %02x%02x... To simplify it a little, you could cast it to a uint64_t *: printf(%16x%16x, ((uint64_t *)this-oinfo.xxx_id)[0], ((uint64_t

[dtrace-discuss] compilation, types and include files

2011-04-14 Thread Vladimir Kotal
Hi again, I am trying to construct set of scripts with common translator definitions stored in separate header file (so that all the scripts can use it): $ cat xlate.h #include sys/types.h inline string state_string[int32_t state] = state == 0 ? initial : state == 1 ?

[dtrace-discuss] tracemem() output on single line

2011-04-13 Thread Vladimir Kotal
Hi all, Is it somehow possible to use tracemem() (or anything else which is able to print array of uchar_t's or string) to print stream of bytes in hexadecimal on single line ? I'd like to do something like this: printf(0x); tracemem(this-oinfo.xxx_id, 32);

Re: [dtrace-discuss] Monitoring Sun Crypto Engine On T2's

2010-03-19 Thread Vladimir Kotal
On 03/17/10 01:21 PM, Tony MacDoodle wrote: Hello, I was wondering if it's possible to monitor the UltraSparc T2 Plus security co-processors built into the CPU with DTrace. This allows the CPU to off-load cryptographic functions to the co-processor. Can this process be monitored and/or probed

Re: [dtrace-discuss] ustack()s of SIGSEGV'ed programs

2008-10-02 Thread Vladimir Kotal
S h i v wrote: snip The appcrash utility works beautifully and is for a similar purpose. The script is not self-contained though: http://blogs.sun.com/gregns/entry/making_system_wide_appcrash_to http://developers.sun.com/solaris/articles/app_crash/app_crash.html I have not heard about

Re: [dtrace-discuss] ustack()s of SIGSEGV'ed programs

2008-10-02 Thread Vladimir Kotal
Jonathan Adams wrote: On Wed, Oct 01, 2008 at 02:18:55PM +0200, Vladimir Kotal wrote: snip dtrace -w -n 'fbt:genunix:sigtoproc:entry/arg2 == 11/ { self-pid=((proc_t *)arg0)-p_pidp-pid_id; stop(); system(/usr/bin/gcore %d, self-pid); system(/usr/bin/prun %d, self-pid

[dtrace-discuss] ustack()s of SIGSEGV'ed programs

2008-10-01 Thread Vladimir Kotal
Hi all, I am trying to write a D script which would print ustack() for every program in the system receiving SIGSEGV. All the stacks printed in trap()/sigtoproc() context do not have meaningful symbols. The following solves the problem to some degree but I'd much rather have a self-contained