This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: tcp.setsockopt probe seems to be returning incorrect optval


David Smith wrote on 25 March 2010 16:38:
> Since the tcp.setsockopt probe doesn't provide an 'optval', it
defaults to 0.  That's why it always looks false.
Ah. I was playing with both $optval and optval, but I thought systemtap
would either die if I asked it for a value that wasn't provided, or just
resolve non built-in values to kernel variables. Thanks for the heads
up.

> You can print the value of $optval, but that's an user address, not a
value.  
Aye I noticed.  

> Assuming you only want to support options that have integer values,
this should work:
> user_int($optval)) }
Thanks David, that was exactly what I needed. 

Oddly, user_int isn't covered by the RHEL 5.4 Language Reference, though
user_string is - looks like the doc didn't get updated for the SystemTap
0.7 release. 

I'll update the warstory & share the love.

Mike

=============================================================================== 
 Please access the attached hyperlink for an important electronic communications disclaimer: 
 http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
 =============================================================================== 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]