HP3000-L Archives

July 2002, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Roy Brown <[log in to unmask]>
Reply To:
Roy Brown <[log in to unmask]>
Date:
Thu, 11 Jul 2002 18:38:17 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (57 lines)
---- Original Message ----
From: <[log in to unmask]>
To: <[log in to unmask]>
Sent: Thursday, July 11, 2002 6:01 PM
Subject: [HP3000-L] End of transfer

> I need to automate a process which seems to defy reliability.

> We are sent files of a type in four sets every weekday. They are sent
> to our public ftp server, and we retrieve them from there. None of
> these sets are sent every day. Two of these sets vary in what they
> contain. We want to retrieve these files from the ftp server, but
> somehow make sure that if we happen to do this during their send to
> the ftp server, we don't miss any.

> Greg Stigers

I guess you can monitor the presence of new files by timestamp.

And I guess you don't have the "don't start till the whole set's arrived"
problem, or you'd need a Z-file as part of that solution anyway.

What's your ftp server running on? You don't say, but as you have the 'I can
grab this halfway through' problem, I guess it's sure not MPE.....

But whatever it is, does it have any analogue of MPE's 'accessors'-monitoring
capability?

Then, as soon as you saw a new file, you could see if it was being accessed by
anybody, and wait until it wasn't.

Failing that, one trick is to watch the EOF; when you see a new file appear,
note its size, sleep for one minute, and note its size again. After two (say)
consecutive minutes without growth (or ten!), you may 'safely' decide the
transmission has ceased.

Ceased yes, but succeeded? How can you ever know? Hopefully you will get an
ftp error if not, but....

Given the vagaries of ftp, any purpose-built file I send over it uses the
'old-fashioned' idea of header and trailer records. The trailer record not
only carries hash totals, but any file without one is known to be either still
arriving or has arrived incomplete, and you can act accordingly.

While I expect that this level of pre-design is another luxury you don't have,
it might be that something about the files as they are can be exploited in
this way.

--
Roy Brown

Posting with the OEnemy, tamed by OE-QuoteFix
http://jump.to/oe-quotefix

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2