Hi, Are there any plans to package Chime for IPS (preferably the release repo)? Thanks, Brian -- This message posted from opensolaris.org
Having Chime in IPS would be nice! Another problem is that a lot of the dtrace toolkit scripts (like tcpsnoop and tcptop) are in various states of broken-ness on OpenSolaris Indiana last time I checked several months ago (see links below): https://opensolaris.org/jive/thread.jspa?messageID=314373 http://opensolaris.org/jive/thread.jspa?threadID=65503&tstart=105 http://opensolaris.org/jive/thread.jspa?messageID=256298 To be fair, it''s probably kind of unfair to expect Brendan Gregg to be the sole maintainer of all these dtrace toolkit scripts, so maybe there is someone else out there who knows dtrace better than I do and actually uses OpenSolaris Indiana who could take a crack at fixing them, because in it''s current state OpenSolaris Indiana might not be the best platform to get dtrace noobs more involved in the dtrace community.... Think about what a buzzkill it must be for your typical Linux kid when they wake up one morning and say to themselves: "I''m going to go to genunix.com and download OpenSolaris 200[8,9].* to experience first hand how awesome dtrace is" and their first encounter with dtrace is something like this: # ./tcpsnoop "/dev/fd/4", line 18: Can''t find include file sys/file.h "/dev/fd/4", line 19: Can''t find include file inet/common.h "/dev/fd/4", line 20: Can''t find include file sys/byteorder.h "/dev/fd/4", line 21: Can''t find include file sys/socket.h "/dev/fd/4", line 22: Can''t find include file sys/socketvar.h dtrace: failed to compile script /dev/fd/11: Preprocessor failed to process input program -- This message posted from opensolaris.org
eh, those links I found on Google all seemed to be from SXCE or Solaris 10. I remember all the networking DTT scripts never working on Indiana though. -- This message posted from opensolaris.org
Anon Y Mous wrote:> Having Chime in IPS would be nice! Another problem is that a lot of the dtrace toolkit scripts (like tcpsnoop and tcptop) are in various states of broken-ness on OpenSolaris Indiana last time I checked several months ago (see links below): > > https://opensolaris.org/jive/thread.jspa?messageID=314373 > > http://opensolaris.org/jive/thread.jspa?threadID=65503&tstart=105 > > http://opensolaris.org/jive/thread.jspa?messageID=256298 > > To be fair, it''s probably kind of unfair to expect Brendan Gregg to be the sole maintainer of all these dtrace toolkit scripts, so maybe there is someone else out there who knows dtrace better than I do and actually uses OpenSolaris Indiana who could take a crack at fixing them, because in it''s current state OpenSolaris Indiana might not be the best platform to get dtrace noobs more involved in the dtrace community.... Think about what a buzzkill it must be for your typical Linux kid when they wake up one morning and say to themselves: "I''m going to go to genunix.com and download OpenSolaris 200[8,9].* to experience first hand how awesome dtrace is" and their first encounter with dtrace is something like this: > > # ./tcpsnoop > "/dev/fd/4", line 18: Can''t find include file sys/file.h > "/dev/fd/4", line 19: Can''t find include file inet/common.hpkg install SUNWhea -- -Alan Coopersmith- alan.coopersmith at sun.com Sun Microsystems, Inc. - X Window System Engineering
Thanks for the help Alan. This is the specific error that I''m getting right now on my 2008.11 box: root at solarisunix:/opt/DTT/Bin# ./tcptop dtrace: failed to compile script /dev/fd/3: line 166: failed to resolve `tcp_g_q: Unknown symbol name This is my opensolaris version: root at solarisunix:/opt/DTT/Bin# cat /etc/release OpenSolaris 2008.11 snv_101b_rc2 X86 Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 19 November 2008 and I''ve got SUNWhea installed as per your suggestion: root at solarisunix:/opt/DTT/Bin# pkg info SUNWhea | grep -i installed State: Installed root at solarisunix:/opt/DTT/Bin# -- This message posted from opensolaris.org
Tcpsnoop gives this error: root at solarisunix:/opt/DTT/Bin# ./tcpsnoop dtrace: failed to compile script /dev/fd/3: line 173: failed to resolve : Unknown variable name root at solarisunix:/opt/DTT/Bin# -- This message posted from opensolaris.org
I think the tcpsnoop error in OpenSolaris 2008.11 is being caused by something that''s somewhere around these lines of code (I used "cat -n" to add line numbers and sed to pick out specific lines of code): root at solarisunix:/opt/DTT/Bin# cat -n /opt/DTT/Bin/tcpsnoop | sed -n ''151,189p'' 151 #include <sys/socket.h> 152 #include <sys/socketvar.h> 153 154 /* 155 * Print header 156 */ 157 dtrace:::BEGIN 158 { 159 /* print optional headers */ 160 OPT_time ? printf("%-14s ", "TIME") : 1; 161 OPT_timestr ? printf("%-20s ", "STRTIME") : 1; 162 OPT_zone ? printf("%4s ", "ZONE") : 1; 163 OPT_proj ? printf("%4s ", "PROJ") : 1; 164 165 /* print main headers */ 166 printf("%5s %6s %-15s %5s %2s %-15s %5s %5s %s\n", 167 "UID", "PID", "LADDR", "LPORT", "DR", "RADDR", "RPORT", 168 "SIZE", "CMD"); 169 } 170 171 172 /* 173 * TCP Process inbound connections 174 * 175 * 0x00200000 has been hardcoded. It was SS_TCP_FAST_ACCEPT, but was 176 * renamed to SS_DIRECT around build 31. 177 */ 178 fbt:sockfs:sotpi_accept:entry 179 /(arg1 & FREAD) && (arg1 & FWRITE) && (args[0]->so_state & 0x00200000)/ 180 { 181 self->sop = args[0]; 182 } 183 184 fbt:sockfs:sotpi_create:return 185 /self->sop/ 186 { 187 self->nsop = (struct sonode *)arg1; 188 } 189 root at solarisunix:/opt/DTT/Bin# Message was edited by: system5 -- This message posted from opensolaris.org
> root at solarisunix:/opt/DTT/Bin# ./tcptop> dtrace: failed to compile script /dev/fd/3: line 166: failed to resolve `tcp_g_q: Unknown symbol name tcp_g_q hasn''t existed as a global in OpenSolaris since IP Instances integrated back in January 2007 (snv_57). Seems the network scripts in the toolkit are in need of some updates. -- meem
If that''s the only thing that''s causing this problem then it shouldn''t be too impossible to fix, as I think there''s only one instance of tcp_g_q in the tcptop script (line 284): root at solarisunix:/opt/DTT/Bin# cat -n tcptop | grep tcp_g_q 284 this->queuep = (queue_t *)`tcp_g_q; /* ` */ and there is another reference to tcp_g_q, in (I think) line 303 of tcpsnoop: root at solarisunix:/opt/DTT/Bin# cat -n tcpsnoop | grep tcp_g_q 303 this->queuep = (queue_t *)`tcp_g_q; /* ` */ root at solarisunix:/opt/DTT/Bin# -- This message posted from opensolaris.org
Just to see if it would work, I tried tcpsnoop_snv instead of the regular vanilla tcpsnoop and got this error on OpenSolaris 2008.11: root at solarisunix:/opt/DTT/Bin# ./tcpsnoop_snv dtrace: failed to compile script /dev/fd/3: line 175: conn_tcp is not a member of struct conn_s root at solarisunix:/opt/DTT/Bin# -- This message posted from opensolaris.org
Perhaps because some amount of this has been subsumed by the IP provider which was added in OpenSolaris? I think Brendan intends to expand this (adding a TCP provider?) rather than reworking the old scripts but his day job keeps getting in the way. Jim --- Anon Y Mous wrote:> Just to see if it would work, I tried tcpsnoop_snv instead of the regular vanilla tcpsnoop and got this error on OpenSolaris 2008.11: > > root at solarisunix:/opt/DTT/Bin# ./tcpsnoop_snv > > dtrace: failed to compile script /dev/fd/3: line 175: conn_tcp is not a member of struct conn_s > > root at solarisunix:/opt/DTT/Bin# >
Anon Y Mous wrote:> Thanks for the help Alan. This is the specific error that I''m getting right now on my 2008.11 box: > > root at solarisunix:/opt/DTT/Bin# ./tcptop > dtrace: failed to compile script /dev/fd/3: line 166: failed to resolve `tcp_g_q: Unknown symbol name > > > This is my opensolaris version: > > root at solarisunix:/opt/DTT/Bin# cat /etc/release > OpenSolaris 2008.11 snv_101b_rc2 X86 > Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. > Use is subject to license terms. > Assembled 19 November 2008 > > > and I''ve got SUNWhea installed as per your suggestion: > > root at solarisunix:/opt/DTT/Bin# pkg info SUNWhea | grep -i installed > State: InstalledThe SUNWhea was to fix the errors about missing *.h files, which I see it has fixed for you. The remaining issues I don''t know how to fix off hand, sorry. -- -Alan Coopersmith- alan.coopersmith at sun.com Sun Microsystems, Inc. - X Window System Engineering
That is kind of ironic that the tcp_g_q would be subsumed by the IP provider given that tcp is at the "Transport Layer" of the OSI model and IP is at the "Network Layer" of the same model. I guess my networking knowledge probably doesn''t mean squat though when it comes to dtrace. The conn_t is part of the implementation of the IP stack in OpenSolaris though, right? In terms of my status as a third party BSD / Linux user with very limited dtrace knowledge trying to debug the errors in these scripts, I do kind of feel like someone who doesn''t know how to swim must feel when they happen to accidentally fall off the side of the ocean liner and get dropped in to the deep end of the Pacific Ocean while on a vacation cruise. I guess it''s time to sink or swim. I''ll spend next week reading through the dtrace documentation to see if there are any clues that might help me get to shore. -- This message posted from opensolaris.org
What about this link: http://opensolaris.org/jive/thread.jspa?threadID=60245&tstart=105 If I replace line 288 of the tcptop_snv file that looks like this: this->tcpp = (tcp_t *)this->connp->conn_tcp; with a line like this: this->tcpp = (tcp_t *)this->connp->conn_proto_priv.cp_tcp; Do you think it would run on OpenSolaris 2008.11 ? I don''t really know what I''m doing, so it makes sense to ask the experts before I try changing random lines of these scripts. -- This message posted from opensolaris.org
Likewise, changing line 307 of tcpsnoop_snv from: this->tcpp = (tcp_t *)this->connp->conn_tcp; to this->tcpp = (tcp_t *)this->connp->conn_proto_priv.cp_tcp; should give me a working tcpsnoop on OpenSolaris 2008.11 as well, right? But what exactly am I doing here by changing these lines of code? -- This message posted from opensolaris.org
> Hi, > > Are there any plans to package Chime for IPS > (preferably the release repo)? > > Thanks, > BrianYes there are plans and I already started working on that but got busy. Hopefully I''ll have something within the next month. Bill -- This message posted from opensolaris.org
Has anybody else tried changing line 307 of tcpsnoop_snv from: this->tcpp = (tcp_t *)this->connp->conn_tcp; to this->tcpp = (tcp_t *)this->connp->conn_proto_priv.cp_tcp; ? What is the difference between "conn_tcp" and "conn_proto_priv.cp_tcp" in dtrace. Does anybody know? I can''t find this in the dtrace documentation. -- This message posted from opensolaris.org
I''ll probably just start a new thread on this tomorrow. I''m guessing everyone filters their e-mails by subject and that 99.9% of the people at Sun use Solaris Express instead of Indiana, so I''m guessing nobody reads e-mails that have "IPS" in the subject header ;-) -- This message posted from opensolaris.org
> Has anybody else tried changing line 307 of tcpsnoop_snv from:> > this->tcpp = (tcp_t *)this->connp->conn_tcp; > > to > > this->tcpp = (tcp_t *)this->connp->conn_proto_priv.cp_tcp; > > ? > > What is the difference between "conn_tcp" and "conn_proto_priv.cp_tcp" > in dtrace. Does anybody know? I can''t find this in the dtrace > documentation. conn_tcp is just a #define for conn_proto_priv.cp_tcp. -- meem