Testing for hung FTP - Linux

This is a discussion on Testing for hung FTP - Linux ; I have a script that runs every 15 minutes that performs an ftp to a windows nt machine and ftp's data to my linux machine. The script currently tests to see if there already is an ftp session running and ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Testing for hung FTP

  1. Testing for hung FTP

    I have a script that runs every 15 minutes that performs an ftp to a
    windows nt machine and ftp's data to my linux machine.

    The script currently tests to see if there already is an ftp session
    running and will exit.

    The problem is that evey once in a while the ftp session will hang and
    the ftp process will stay so when the next 15 minute window occurs it
    sees an ftp session already there and will exit. So no more data is
    being ftp'd.

    Any insight as to how I could tell if an ftp session is active or
    inactive from a running script.


  2. Re: Testing for hung FTP

    Martin.Tempelaar@sympatico.com writes:

    > I have a script that runs every 15 minutes that performs an ftp to a
    > windows nt machine and ftp's data to my linux machine.
    >
    > The script currently tests to see if there already is an ftp session
    > running and will exit.
    >
    > The problem is that evey once in a while the ftp session will hang and


    well, do you know the file name that the previous ftp would be writing
    to?

    if so; suppose the output file is named 'outputFile'.

    touch timeStampFile
    sleep 5
    find outputFile -newer timeStampFile

    now, if the find command prints 'outputFile', then it is still being
    written to and the old ftp process should be left running till the
    next time interval.

    HTH



    --
    -------------------------------------------------------------------------------
    Jerry Sievers 305 854-3001 (home) Unix Administrator/Consultant
    305 321-1144 (mobile http://www.JerrySievers.com/

  3. Re: Testing for hung FTP

    "Jerry Sievers" wrote in message
    news:m3n0a0of06.fsf@prod01.jerrysievers.com

    > well, do you know the file name that the previous ftp would be writing
    > to?
    > if so; suppose the output file is named 'outputFile'.
    >
    > touch timeStampFile
    > sleep 5
    > find outputFile -newer timeStampFile
    >
    > now, if the find command prints 'outputFile', then it is still being
    > written to and the old ftp process should be left running till the
    > next time interval.


    The result of the above test would be true if the file had finished being
    written to 4 minutes ago.

    --
    use hotmail for any email replies



    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

  4. Re: Testing for hung FTP

    Martin.Tempelaar@sympatico.com wrote in message news:<3FD6CDB5.928480DE@sympatico.com>...
    > I have a script that runs every 15 minutes that performs an ftp to a
    > windows nt machine and ftp's data to my linux machine.
    >
    > The script currently tests to see if there already is an ftp session
    > running and will exit.
    >
    > The problem is that evey once in a while the ftp session will hang and
    > the ftp process will stay so when the next 15 minute window occurs it
    > sees an ftp session already there and will exit. So no more data is
    > being ftp'd.
    >
    > Any insight as to how I could tell if an ftp session is active or
    > inactive from a running script.


    Martin,

    You could check the size of the file you are downloading to see if it
    is growing. If not chances are you're in trouble. I'd check it
    through at least 2 iterations of your script to ensure it's not just a
    slow network.

    Randy

  5. Re: Testing for hung FTP

    oh really? did you test my sample?

    "ynotssor" <"ynotssor"> writes:

    > "Jerry Sievers" wrote in message
    > news:m3n0a0of06.fsf@prod01.jerrysievers.com
    >
    > > well, do you know the file name that the previous ftp would be writing
    > > to?
    > > if so; suppose the output file is named 'outputFile'.
    > >
    > > touch timeStampFile
    > > sleep 5
    > > find outputFile -newer timeStampFile
    > >
    > > now, if the find command prints 'outputFile', then it is still being
    > > written to and the old ftp process should be left running till the
    > > next time interval.

    >
    > The result of the above test would be true if the file had finished being
    > written to 4 minutes ago.
    >
    > --
    > use hotmail for any email replies
    >
    >
    >
    > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    > http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    > -----== Over 100,000 Newsgroups - 19 Different Servers! =-----


    --
    -------------------------------------------------------------------------------
    Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
    305 321-1144 (mobile http://www.JerrySievers.com/

  6. Re: Testing for hung FTP

    "Jerry Sievers" wrote in message
    news:m34qw7497s.fsf@prod01.jerrysievers.com

    > oh really? did you test my sample?


    Yes.

    --
    use hotmail for any email replies


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

+ Reply to Thread