On 05.05.10 18:11, Yossi Lev wrote:
Hi Michael
I just found a function that (sort of) does what I need: it is called lltostr
and it takes a long long integer, and returns a string that represents it.
(Unfortunately I didn't find an option to do the translation in hexadecimal,
but I can live with that...)
As for your question, I need to use the numbers as a key to an aggregation, but
I need to concatenate a few of those. In particular, I have a sequence of N
numbers where N< 9, and I need to count how many times I'm getting each
sequence. The value of N may be different in separate invocations of the probe
function, so I would like to use an unrolled loop to concatenate the N numbers to
single string representing the sequence, and then use the string as the key to my
aggregation.
Do you see any other option but to use the lltostr function to and concatenate
the resulted strings?
does this answer your question:
$ pfexec dtrace -n 'syscall:::ent...@c[execname,pid] = count()}'
dtrace: description 'syscall:::entry' matched 227 probes
look closely at the "[...]" part :-)
HTH
Michael
--
michael.schus...@oracle.com http://blogs.sun.com/recursion
Recursion, n.: see 'Recursion'
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org