Hi, All, What''s the maximum length of copyinstr? I used the following line in the action part, but the got sql is not complete. Apparently it got truncated. Is there anyway to get the full string instead of a partial one? pid113::*mysql_parse*:entry { printf("%s\n",copyinstr(arg1)); } Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20090416/12c087af/attachment.html>
John Wren Kennedy
2009-Apr-16 02:10 UTC
[dtrace-discuss] the content of copyinstr get truncated.
Qihua Wu wrote:> What''s the maximum length of copyinstr? I used the following line in the > action part, but the got sql is not complete. Apparently it got > truncated. Is there anyway to get the full string instead of a partial one? > > pid113::*mysql_parse*:entry > { > printf("%s\n",copyinstr(arg1)); > }You can modify the amount copied with this: #pragma D option strsize=XXX Where "XXX" is some number big enough for your string. 1K, or whatever. The default is apparently 256. -- John Wren Kennedy Solaris RPE
Angelo Rajadurai
2009-Apr-16 02:12 UTC
[dtrace-discuss] the content of copyinstr get truncated.
Hi Strings in D are 256 bytes by default. You can change the default using the strsize pragma. #!/usr/sbin/dtrace -s #pragma D option strsize=1024 pid113::*mysql_parse*:entry { printf("%s\n",copyinstr(arg1)); } -Angelo On Apr 15, 2009, at 10:01 PM, Qihua Wu wrote:> Hi, All, > > What''s the maximum length of copyinstr? I used the following line in > the action part, but the got sql is not complete. Apparently it got > truncated. Is there anyway to get the full string instead of a > partial one? > > pid113::*mysql_parse*:entry > { > printf("%s\n",copyinstr(arg1)); > } > > Thanks, > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20090415/df32f6ee/attachment.html>