Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-21-2008, 01:44 PM   #1
LQ Newbie
Registered: Feb 2008
Posts: 1

Rep: Reputation: 0
Question How to implement this process

we are doing FTP (one report out put) from one server to another server through shell script program, which is run from oracle application.

Due to the network issues, some times FTP process is hanging.

So we planned to modify the existing program with the following requirements..

1)FTP connection established.
a) one background process should notify(send a mail to user) user if the FTP connection is active after 20 minutes of connection established. After sending a mail this process should be ended.

Even if the FTP is completed within 20 minutes this processes should be closed without notifying (immediately after completion of FTP)

b) Main process will do FTP..
If the FTP is completed unsuccessfully then will notify user with this information....

Please provide me solution for this..

Old 02-21-2008, 04:19 PM   #2
Registered: Aug 2005
Posts: 239
Blog Entries: 1

Rep: Reputation: 31
echo $$ > ftpprocess.lock
ftp <<**
rm ftpprocess.lock
sleep 20m
if [ -f "ftpprocess.lock" ]; then
    echo "ftp process has timed out"
    kill -9 `cat ftpprocess`
sh &
all above code is hand written and untested and may need to be modified to fit your circumstances.

if the process runs often you will have to kill the on sucessful completion of ftppreocess


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
implement pipe using C chrislam Programming 3 09-17-2007 10:33 AM
rsync : how to use and implement indiancosmonaut Solaris / OpenSolaris 8 03-05-2007 12:54 AM
how to implement bridging kaleeshwari Linux - Networking 1 01-22-2007 07:11 AM
About SSH, how to implement this? ICO Linux - Networking 2 04-14-2006 04:52 PM
Shell implement in c SatYr_84 Programming 8 10-06-2005 01:44 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration