I have one for you. I have a perl script (cron job) set up to check for the existence of a specific filename every 30 minutes. If it exists, download and delete it. If not, well, don't.  :-)
I am using Expect for the actual download part. What is happening with one location is every couple of weeks, a file is missed. They claim we must be deleting it before downloading it. Anyone who understand how Expect works, will realize that if the file isn't their, the script can never get to the point where it would delete the file. (It just hangs and waits for the file to appear, and eventually reaches the timeout period and dies.)
What I would like to do is to login, do an 'ls -la' and capture that output to a file, and save the file for future reference. The next time that the missing file thing happens, I can review the directory listing and see if it was actually present. Does WUG support the ability to do an:
ls -la
and capture the output?
 
I could write it in perl, if I just had the time..... Was hoping maybe someone here had already done such a thing before.
 
--Bruce
-----Original Message-----
From: Anthony Franklin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 19, 2005 2:04 PM
To: [email protected]
Subject: RE: [WhatsUp Forum] Scripted FTP Login

I have noticed the comment that "This does not test that the FTP service is capable of transferring files..."  Checking this capability can be done easily with scripting. 
 
Simply write a script that transfers a copy of a custom test/html file from the FTP server to the what's up server every minute( or whatever interval you like).
 
Check the file content using Whats Up. 
 
Delete the file using the script. 
 
On each poll the file is not availlable for reading, that would indicate the file transfer was not successful, thus the service check would fail.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Daniel Donnelly
Sent: Monday, July 18, 2005 12:47 PM
To: [email protected]
Subject: RE: [WhatsUp Forum] Scripted FTP Login

This is one I've used!
 
# If your FTP server sends multiple lines in response to
# commands, this simple script will fail!
#Connection response
SimpleExpect=220
#Begin user login
Send=USER testuser\r\n
#User name accepted?
# Text after number may be different for your server!
# Try removing the text leaving only the number
SimpleExpect=331 Password required
#Send password
Send=pass testuser\r\n
#User logged in?
# Text after number may be different for your server!
# Try removing the text leaving only the number
SimpleExpect=230 user logged in
#Disconnect
Send=QUIT\r\n
# Text after number may be different for your server!
# Try removing the text leaving only the number
SimpleExpect=221 Good-Bye
This does not really test that the FTP service is capable of transferring files, that would require much more than WU can do...
 
Daniel Donnelly

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Robert Goodwin
Sent: Monday, July 18, 2005 10:25 AM
To: [email protected]
Subject: [WhatsUp Forum] Scripted FTP Login

Has anyone scripted a login for an FTP site to validate the server is actually working?

 

Not just a port query

 

For WUP 8

Reply via email to