Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
How To: "Ping" FTP Server List
Results 1 to 3 of 3

Thread: How To: "Ping" FTP Server List

  1. #1

    How To: "Ping" FTP Server List

    Hi all,

    I've a problem concerning a "network" of ftp servers to which I have to connect one after the other. The problem consists in the reply from not available servers that hangs without response (no messages such as "Connection refused" or "Destionation unreachable").

    Do you know any commands to manage ftp replies or to test ftp connection before it hangs??

    Thank you for your attention.

    Jacorobo

  2. #2
    Quote Originally Posted by jacorobo View Post
    Hi all,

    I've a problem concerning a "network" of ftp servers to which I have to connect one after the other. The problem consists in the reply from not available servers that hangs without response (no messages such as "Connection refused" or "Destionation unreachable").

    Do you know any commands to manage ftp replies or to test ftp connection before it hangs??

    Thank you for your attention.

    Jacorobo
    There are a lot of possibilities. One example would be to write a shell script which pings the server, before you attempt to log into it. Perhaps something like
    Code:
    for i in server1 server2 do
      ping -c1 $i >/dev/null 2>/dev/null
      if [ $? = 0 ]; then
        ftp $i < somescript
      fi
    done

  3. #3
    Thx hysterik.

    However we found a solution that consists in:

    - launching ftp
    - catch PID of ftp connection
    - sleep for n seconds
    - ps, looking for the PID and its status (S = 'Sleep')
    - if status = S then kill
    else
    connect

    It works fine! ;-)

Similar Threads

  1. "TELNET-SERVER" connection problem...help me to solve
    By ringque in forum Linux - Hardware, Networking & Security
    Replies: 4
    Last Post: 03-02-2010, 08:33 PM
  2. Websense / Cisco "ip urlfilter server vendor" functionality in OSS product
    By Outlaw in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 02-19-2010, 06:33 PM
  3. "groupadd" and "tree" utilities are nowhere??
    By aromes in forum Redhat / Fedora
    Replies: 1
    Last Post: 10-05-2003, 03:50 AM
  4. Replies: 0
    Last Post: 09-16-2003, 01:23 PM
  5. Xlib:  extension "GLX" missing on display ":0.0".
    By ph34r in forum Linux - Software, Applications & Programming
    Replies: 5
    Last Post: 12-06-2001, 04:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •