Sun.betty
2007-Mar-13 02:47 UTC
[dtrace-discuss] about use dtrace analyze tomcat''s situation
everyone Here: How do you do! dtrace is interesting. I am studing how to write dtrace script and analyze situation. I read dtrace_example.pdf and 819-6959.pdf document more than five times with careful. because I am newbie to studing dtrace.so I still don''t know how to begin. for question: 1. What consumes time? 2. Which system call(s) consume(s) time? --------------------------------------------- from document dtrace_example.pdf I find follow D script vi sctime.d syscall:::entry /pid == $target/ { self->ts = timestamp; } syscall:::return /self->ts/ { ela = timestamp - self->ts; @tot[probefunc] = sum(ela); } END { normalize(@tot, 1000); printa("%12s %@12u\n", @tot); } get Tomcat''s pid : $ ps -ef | grep tomcat tomcat 249 7 0 12:08:02 console 0:01 -sh tomcat 12475 12474 0 18:12:15 pts/3 0:00 ps -ef tomcat 634 1 0 12:08:14 ? 13:19 /usr/j2sdk1.4.2_04/bin/java -XX:MaxPermSize=256m -Xms512m -Xmx768m -Djava.awt.h tomcat 10324 10321 0 17:37:36 pts/3 0:00 -sh tomcat 12474 10324 0 18:12:15 pts/3 0:00 grep tomcat $ # dtrace -s ./sctime.d -p 634 dtrace: script ''./sctime.d'' matched 457 probes ^C CPU ID FUNCTION:NAME 8 2 :END lwp_cond_signal 67 bind 271 lwp_sigmask 282 getsockname 456 so_socket 528 fstat64 714 setsockopt 843 setcontext 946 ioctl 959 lwp_mutex_wakeup 1105 lwp_cond_broadcast 1430 close 1431 connect 2503 fsat 2505 getdents64 3894 fcntl 6785 doorfs 7043 resolvepath 8684 access 22627 send 73748 write 102515 stat64 126195 lwp_mutex_timedlock 339137 accept 273694273 read 285744641 pollsys 1213647291 lwp_cond_wait 1553123938 can see lwp_cond_wait consume about 1553(s) pollsys consume about 1213(s) I want to know what are they doing? but I don''t know how to do.... Hope you can help me !how to analyze this ? Please!Help! --------------------------------- ??????-3.5G???20M?? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070313/f8686fce/attachment.html>