Hello all, i''m trying to run the tool tcptop from the dtracetoolkit but it fails. I got the following error: tcptop -C 30 dtrace: failed to compile script /dev/fd/11: "usr/include/sys/kstat.h", line 439: invalid type combination I let it run on different machines on a Ultra 45 and a E20K both with Solaris 10 same result. any ideas? best regards Jens This message posted from opensolaris.org
This is a known bug (#6315039) that is fixed in 119578-29. On 12/13/06, Jens Nickel <nickelj at bluewin.ch> wrote:> Hello all, > > i''m trying to run the tool tcptop from the dtracetoolkit but it fails. > > I got the following error: > > tcptop -C 30 > dtrace: failed to compile script /dev/fd/11: "usr/include/sys/kstat.h", line 439: invalid type combination > > I let it run on different machines on a Ultra 45 and a E20K both with Solaris 10 same result. > > any ideas? > > best regards > > Jens > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >-- Ilya Voronin <ivoronin at gmail.com> http://blog.curthread.org
wow, fast as the wind :-) thank you very much i''ll have a look at that patch and apply. cheers, Jens This message posted from opensolaris.org
Hi All, i applied the mentioned patch which is yet at 119578-30 and i still get the same error. Unfortunately i found on Sunsolve the following Note Bug ID: 6468001 Synopsis: need to complete the fix for 6315039 in 119578-21 Category: consolidation Subcategory: os-net-patch State: 7-Fix in Progress Description: As of 119578-21 and all the way through 119578-30 (latest T-Patch), the patch READMEs claim that CR#6315039 "including <sys/kstat.h> in a D script induces compile-time error" was fixed by these FMA patches. It isn''t. The FMA patches do not deliver /usr/include/sys/kstat.h . (On x86, no fix for 6315039 seems to be available yet at all, not even a merely claimed one. 118344-13 does not cite this bug id.) Date Modified: 2006-09-06 22:57:14 GMT+00:00 Work Around: Suggested Fix: Evaluation: Fixed by patch: Integrated in Build: Duplicate of: Related Change Request(s): 6315039 6474652 6475362 Date Modified: 2006-11-11 17:40:49 GMT+00:00 Public Summary: it seems, that we have to wait... :-) regards Jens This message posted from opensolaris.org
Jens Nickel wrote:> Hi All, > > i applied the mentioned patch which is yet at 119578-30 and > i still get the same error. > Unfortunately i found on Sunsolve the following Note > > Bug ID: 6468001...> > it seems, that we have to wait... :-) >Or use a hack for a work-around: Place a copy of /usr/include/sys/kstat.h into the Net/ directory of the toolkit. Edit that file to change the "string" definition to "String": # diff kstat.h /usr/include/sys 439c439 < } String; --- > } string; Edit tcptop to include this kstat.h: # diff tcptop tcptop.sav 111c111 < /usr/sbin/dtrace -I. -Cs <( print -r '' --- > /usr/sbin/dtrace -Cs <( print -r '' 126d125 < #include "kstat.h" # ./tcptop Tracing... Please wait. Jim
Jens, You could also remove the includes for socket.h and socketvar.h from the embedded DTrace script. tcptop and tcpsnoop don''t seem to need them. (These includes include kstat.h indirectly.) However, in Solaris 10, the tcp scripts have another issue. The IP addresses fields are not filled in. I believe the fbt probes yield different results in Solaris 10 than OpenSolaris, where they were tested, which is why you should avoid fbt probes for scripts that require long term stability. Chip Jim Fiori wrote:> Jens Nickel wrote: >> Hi All, >> >> i applied the mentioned patch which is yet at 119578-30 and >> i still get the same error. >> Unfortunately i found on Sunsolve the following Note >> >> Bug ID: 6468001 > ... >> >> it seems, that we have to wait... :-) >> > > Or use a hack for a work-around: > > Place a copy of /usr/include/sys/kstat.h into the Net/ directory of > the toolkit. > Edit that file to change the "string" definition to "String": > > # diff kstat.h /usr/include/sys > 439c439 > < } String; > --- > > } string; > > Edit tcptop to include this kstat.h: > > # diff tcptop tcptop.sav > 111c111 > < /usr/sbin/dtrace -I. -Cs <( print -r '' > --- > > /usr/sbin/dtrace -Cs <( print -r '' > 126d125 > < #include "kstat.h" > > # ./tcptop > Tracing... Please wait. > > > Jim > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
Brendan Gregg - Sun Microsystems
2006-Dec-14 20:42 UTC
[dtrace-discuss] Re: tcptop fail to run
G''Day Jens, On Thu, Dec 14, 2006 at 02:24:52AM -0800, Jens Nickel wrote:> Hi All, > > i applied the mentioned patch which is yet at 119578-30 and > i still get the same error. > Unfortunately i found on Sunsolve the following Note > > Bug ID: 6468001 > Synopsis: need to complete the fix for 6315039 in 119578-21 > Category: consolidation > Subcategory: os-net-patch > State: 7-Fix in Progress > Description: > > As of 119578-21 and all the way through 119578-30 (latest T-Patch), the > patch READMEs claim that CR#6315039 "including <sys/kstat.h> in a D script > induces compile-time error" was fixed by these FMA patches. > > It isn''t. The FMA patches do not deliver /usr/include/sys/kstat.h . > > (On x86, no fix for 6315039 seems to be available yet at all, not > even a merely claimed one. 118344-13 does not cite this bug id.)[...] Thanks for chasing this up and posting. This was fixed a long time ago in Solaris Nevada, yet there seems to have been a mix-up with the patch for Solaris 10. Hopefully the very next rev of this patch will fix it up. I do want to publish a DTraceToolkit update soon so that these scripts work for customers who are running newer versions of Solaris 10, and haven''t patched (or are waiting for the patch). I''m sorry I haven''t done this sooner (in the last three months I changed jobs and countries). This isn''t the first issue with the tcp scripts - in the past I''ve made some quick updates as the kernel has changed, which I''ve always expected to do since they are fbt provider based. This is also the reason why I only wrote a few DTrace networking tools - there are dozens of really cool tools I *want* to write, but they will need to wait until we have a stable network provider. So the best fix for this is to add a stable DTrace network provider to Solaris, which I''ve been working on as a side project. That way I can write numerous network scripts that will always work. In the meantime I''ll need to update the DTraceToolkit as these issues are encountered. cheers, Brendan -- Brendan [CA, USA]
Brendan Gregg - Sun Microsystems
2006-Dec-14 20:43 UTC
[dtrace-discuss] Re: tcptop fail to run
G''Day Jim, Thanks for posting the work-around, looks good. :) Brendan On Thu, Dec 14, 2006 at 07:39:59AM -0500, Jim Fiori wrote:> Jens Nickel wrote: > >Hi All, > > > >i applied the mentioned patch which is yet at 119578-30 and > >i still get the same error. > >Unfortunately i found on Sunsolve the following Note > > > >Bug ID: 6468001 > ... > > > >it seems, that we have to wait... :-) > > > > Or use a hack for a work-around: > > Place a copy of /usr/include/sys/kstat.h into the Net/ directory of the > toolkit. > Edit that file to change the "string" definition to "String": > > # diff kstat.h /usr/include/sys > 439c439 > < } String; > --- > > } string; > > Edit tcptop to include this kstat.h: > > # diff tcptop tcptop.sav > 111c111 > < /usr/sbin/dtrace -I. -Cs <( print -r '' > --- > > /usr/sbin/dtrace -Cs <( print -r '' > 126d125 > < #include "kstat.h" > > # ./tcptop > Tracing... Please wait. > > > Jim > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Brendan [CA, USA]
Hi Jim, tried your workaround and lovely thank you very much it work. But i had to give the full path for the kstat.h copy. Like "#include </opt/DTT/Net/kstat.h> Then it work like a charm :-)) cheers Jens This message posted from opensolaris.org
Hi Chip, i tried your workaround as well and of course it works as well. And as you already mentioned the address fields are not filled in. This is different to the workaround from Jim Fiori there are the address fields filled. Well it was at least yesterday when i tried first Jim''s workaround, today after i changed from your version back again to Jim''s, the address fields stays sometimes empty. just to let you know :) cheers Jens This message posted from opensolaris.org
Jens, I''ve tried both removing the includes and renaming the typedef (string), and in both cases I get zeros for the IP addresses in Solaris 10. I thought I had figured out a some time ago that it was because of differences in the kernel rather than the lack of the includes, but maybe I missed something. Thanks, Chip Jens Nickel wrote:> Hi Chip, > > i tried your workaround as well and of course it works as well. > And as you already mentioned the address fields are not filled in. > > This is different to the workaround from Jim Fiori there are the > address fields filled. Well it was at least yesterday when i tried first > Jim''s workaround, today after i changed from your version back again > to Jim''s, the address fields stays sometimes empty. > > just to let you know :) > > cheers > Jens > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >