Sun.betty
2007-Mar-16 03:01 UTC
[dtrace-discuss] want use dtrace survey ftp no answer question!SOS!
Hi! everybody here!
use ftp command login in server, enter username and password , login
successful.
use ls or put or get command , wait for a long time, no result return, so,
I decided to use dtrace seeing what are they doing?
# ps -ef | grep ftp | grep -v grep
tomcat 25582 245 0 10:01:09 ? 0:00 /usr/sbin/in.ftpd -a
tomcat 25589 245 0 10:02:32 ? 0:00 /usr/sbin/in.ftpd -a
tomcat 25584 245 0 10:01:20 ? 0:00 /usr/sbin/in.ftpd -a
#
# ps -ef | grep 245
root 245 1 0 Mar 12 ? 1:41 /usr/lib/inet/inetd start
-----------------------------------------------------------------------------------------------
Use DTrace 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);
}
dtrace -s ./sctime.d -p 245
# dtrace -s ./sctime.d -p 245
dtrace: script ''./sctime.d'' matched 453 probes
^C
CPU ID FUNCTION:NAME
1 2 :END lwp_sigmask 77
fcntl 154
stat64 511
lwp_continue 566
ioctl 694
accept 1588
waitsys 2373
open64 3271
close 4687
getpid 8596
lwp_suspend 27874
fork1 36887
doorfs 743404
pollsys 988028527
lwp_park 1220857999
#
If you have any idea or tips about working out this question, please help me!
Why ftp consume so much time? what are ftp doing? It''s
interesting,but I am really new to dtrace. So if you know how to do,Please help
me!
Thanks for help very much ,anyway.
Best regards
---------------------------------
????????-3.5G???20M???
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070316/0aa64972/attachment.html>
Jonathan Adams
2007-Mar-16 12:54 UTC
[dtrace-discuss] want use dtrace survey ftp no answer question!SOS!
On 3/15/07, Sun.betty <alanxzq at yahoo.com.cn> wrote:> Hi! everybody here! > > use ftp command login in server, enter username and password , login > successful. > use ls or put or get command , wait for a long time, no result return, so, > I decided to use dtrace seeing what are they doing? > # ps -ef | grep ftp | grep -v grep > tomcat 25582 245 0 10:01:09 ? 0:00 /usr/sbin/in.ftpd -a > tomcat 25589 245 0 10:02:32 ? 0:00 /usr/sbin/in.ftpd -a > tomcat 25584 245 0 10:01:20 ? 0:00 /usr/sbin/in.ftpd -a > # > # ps -ef | grep 245 > root 245 1 0 Mar 12 ? 1:41 /usr/lib/inet/inetd start > -----------------------------------------------------------------------------------------------Why not use truss? Something like: (connect to ftp, log in, then stop) server# pgrep -n in.ftpd # (finds the newest in.ftpd process) 25584 server# truss -f -p 25584 # (traces all activity from that pid, -f includes children) (now, type "ls" or whatever in your ftp client) Cheers, - jonathan
Wee Yeh Tan
2007-Mar-18 02:58 UTC
[dtrace-discuss] want use dtrace survey ftp no answer question!SOS!
Hi, You d-script is almost answering the question, "How long did this process stay in each system call". lwp_park & pollsys took an aggregated 1s. Note that this time includes times not spent on CPU. I''ll be taking samples of the call stack to see what''s going on. -- Just me, Wire ... On 3/16/07, Sun.betty <alanxzq at yahoo.com.cn> wrote:> Hi! everybody here! > > use ftp command login in server, enter username and password , login > successful. > use ls or put or get command , wait for a long time, no result return, so, > I decided to use dtrace seeing what are they doing? > # ps -ef | grep ftp | grep -v grep > tomcat 25582 245 0 10:01:09 ? 0:00 /usr/sbin/in.ftpd -a > tomcat 25589 245 0 10:02:32 ? 0:00 /usr/sbin/in.ftpd -a > tomcat 25584 245 0 10:01:20 ? 0:00 /usr/sbin/in.ftpd -a > # > # ps -ef | grep 245 > root 245 1 0 Mar 12 ? 1:41 /usr/lib/inet/inetd start > ----------------------------------------------------------------------------------------------- > Use DTrace 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); > } > > dtrace -s ./sctime.d -p 245 > # dtrace -s ./sctime.d -p 245 > dtrace: script ''./sctime.d'' matched 453 probes > ^C > CPU ID FUNCTION:NAME > 1 2 :END lwp_sigmask 77 > fcntl 154 > stat64 511 > lwp_continue 566 > ioctl 694 > accept 1588 > waitsys 2373 > open64 3271 > close 4687 > getpid 8596 > lwp_suspend 27874 > fork1 36887 > doorfs 743404 > pollsys 988028527 > lwp_park 1220857999 > > # > If you have any idea or tips about working out this question, please help > me! > Why ftp consume so much time? what are ftp doing? It''s interesting,but I am > really new to dtrace. So if you know how to do,Please help me! > > Thanks for help very much ,anyway. > > > Best regards > > > ________________________________ > ????????-3.5G???20M??? > > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >