to all this is what i am getting from the following code:
#!/usr/local/bin/ruby
require 'net/ftp'
Net::FTP.open('openbsd.secsup.org') do |ftp|
ftp.login
files = ftp.chdir('/pub/openbsd/OpenSSH/portable')
ftp.getbinaryfile('openssh-3.8.1p1.tar.gz', 'openssh.tar.gz', 1024)
end
···
-------------------------------------
# ruby -wv -rprofile ftp.rb
ruby 1.8.2 (2004-07-24) [powerpc-darwin7.4.0]
% cumulative self self total
time seconds seconds calls ms/call ms/call name
32.35 0.11 0.11 58 1.90 2.07 Net::FTP#getline
17.65 0.17 0.06 3 20.00 40.00 Kernel.require
11.76 0.21 0.04 6 6.67 26.67
Net::FTP#getmultiline
8.82 0.24 0.03 1 30.00 40.00 Net::FTP#sendport
8.82 0.27 0.03 8 3.75 3.75
MonitorMixin.mon_exit
5.88 0.29 0.02 1 20.00 20.00
Profiler__.start_profile
5.88 0.31 0.02 134 0.15 0.15 Module#method_added
5.88 0.33 0.02 8 2.50 55.00
MonitorMixin.synchronize
2.94 0.34 0.01 8 1.25 1.25
MonitorMixin.mon_acquire
2.94 0.35 0.01 5 2.00 2.00 IO#write
2.94 0.36 0.01 58 0.17 0.17 String#sub!
0.00 0.36 0.00 56 0.00 0.00 String#==
0.00 0.36 0.00 3 0.00 0.00 IPSocket#addr
0.00 0.36 0.00 1 0.00 0.00 TCPSocket#open
0.00 0.36 0.00 8 0.00 1.25
MonitorMixin.mon_enter
0.00 0.36 0.00 110 0.00 0.00 String#<<
0.00 0.36 0.00 1 0.00 0.00 Array#each
0.00 0.36 0.00 1 0.00 70.00 Net::FTP#list
0.00 0.36 0.00 18 0.00 0.00 Class#inherited
0.00 0.36 0.00 1 0.00 0.00
Exception#initialize
0.00 0.36 0.00 2 0.00 80.00 Net::FTP#sendcmd
0.00 0.36 0.00 1 0.00 20.00 Class#new
0.00 0.36 0.00 7 0.00 0.00 Regexp#===
0.00 0.36 0.00 1 0.00 0.00
TCPServer#initialize
0.00 0.36 0.00 1 0.00 40.00 Net::FTP#makeport
0.00 0.36 0.00 8 0.00 0.00
MonitorMixin.mon_check_owner
0.00 0.36 0.00 1 0.00 0.00
Net::FTPTempError#exception
0.00 0.36 0.00 1 0.00 0.00 Array#join
0.00 0.36 0.00 1 0.00 70.00 Net::FTP#retrlines
0.00 0.36 0.00 1 0.00 0.00 Exception#backtrace
0.00 0.36 0.00 1 0.00 0.00 Object#initialize
0.00 0.36 0.00 4 0.00 0.00
Module#attr_accessor
0.00 0.36 0.00 4 0.00 0.00 Array#
0.00 0.36 0.00 1 0.00 340.00 #toplevel
0.00 0.36 0.00 1 0.00 0.00 Fixnum#%
0.00 0.36 0.00 2 0.00 0.00 Module#include
0.00 0.36 0.00 32 0.00 0.00 Thread#critical=
0.00 0.36 0.00 4 0.00 5.00 Net::FTP#voidresp
0.00 0.36 0.00 1 0.00 60.00
Net::FTP#transfercmd
0.00 0.36 0.00 1 0.00 0.00
Exception#set_backtrace
0.00 0.36 0.00 18 0.00 0.00 Module#private
0.00 0.36 0.00 2 0.00 0.00 Fixnum#to_s
0.00 0.36 0.00 4 0.00 0.00
MonitorMixin.mon_release
0.00 0.36 0.00 1 0.00 0.00 TCPServer#open
0.00 0.36 0.00 2 0.00 0.00
Module#append_features
0.00 0.36 0.00 1 0.00 0.00
MonitorMixin.mon_initialize
0.00 0.36 0.00 125 0.00 0.00 String#
0.00 0.36 0.00 20 0.00 0.00 Thread#current
0.00 0.36 0.00 1 0.00 0.00 Kernel.raise
0.00 0.36 0.00 1 0.00 20.00 Net::FTP#chdir
0.00 0.36 0.00 10 0.00 0.00 String#+
0.00 0.36 0.00 1 0.00 20.00 Net::FTP#connect
0.00 0.36 0.00 1 0.00 150.00 Net::FTP#login
0.00 0.36 0.00 1 0.00 0.00
MonitorMixin.initialize
0.00 0.36 0.00 8 0.00 0.00 Thread#pass
0.00 0.36 0.00 23 0.00 0.00
Kernel.singleton_method_added
0.00 0.36 0.00 1 0.00 0.00 Fixnum#/
0.00 0.36 0.00 3 0.00 13.33 Net::FTP#voidcmd
0.00 0.36 0.00 3 0.00 0.00 Module#attr_reader
0.00 0.36 0.00 1 0.00 0.00 Array#+
0.00 0.36 0.00 6 0.00 26.67 Net::FTP#getresp
0.00 0.36 0.00 8 0.00 0.00 Array#shift
0.00 0.36 0.00 8 0.00 0.00 Fixnum#+
0.00 0.36 0.00 73 0.00 0.00 Fixnum#==
0.00 0.36 0.00 1 0.00 20.00 Net::FTP#initialize
0.00 0.36 0.00 8 0.00 0.00 Fixnum#-
0.00 0.36 0.00 1 0.00 0.00 String#split
0.00 0.36 0.00 58 0.00 0.00 IO#readline
0.00 0.36 0.00 1 0.00 0.00
Net::FTP#open_socket
0.00 0.36 0.00 1 0.00 0.00 IPSocket#peeraddr
0.00 0.36 0.00 5 0.00 2.00 Net::FTP#putline
0.00 0.36 0.00 1 0.00 0.00
TCPSocket#initialize
0.00 0.36 0.00 12 0.00 0.00 Kernel.==
0.00 0.36 0.00 2 0.00 0.00 Module#included
/usr/local/lib/ruby/1.8/net/ftp.rb:241:in `getresp': 421 Timeout
(Net::FTPTempError)
from /usr/local/lib/ruby/1.8/net/ftp.rb:264:in `sendcmd'
from /usr/local/lib/ruby/1.8/net/ftp.rb:262:in `synchronize'
from /usr/local/lib/ruby/1.8/net/ftp.rb:262:in `sendcmd'
from /usr/local/lib/ruby/1.8/net/ftp.rb:336:in `transfercmd'
from /usr/local/lib/ruby/1.8/net/ftp.rb:421:in `retrlines'
from /usr/local/lib/ruby/1.8/net/ftp.rb:419:in `synchronize'
from /usr/local/lib/ruby/1.8/net/ftp.rb:419:in `retrlines'
from /usr/local/lib/ruby/1.8/net/ftp.rb:628:in `list'
from ftp.rb:8