On 12/02/2009 06:06 PM, Amit Sharma <amit_...@yahoo.com> wrote:
Any pointers?
If a script runs from the console but not from cron, 99% of the time
it's one of these two things -

1. The user which executes the cron script is not the same


But the scripts runs for say 18Gb and then gives the 'not enough disk space 
error'

Do any of your partitions have ~18GB as free space? Do a `df -h` and see

Yes. Many Partitions have 18GB or more free space.


I asked the question to ascertain if there's a particular partition, say /tmp which has around 18GB of disk space and the file is temporarily transferred there. Since the disk space is limited to ~18GB, the file being transferred there temporarily isn't copied completely, and instantly gives the error and halts. Just a guess. You may want to check the disk sizes while the upload is in progress.

I would like to emphasise on the point again .....

Same Script is able to successfully transfer (FTP) 40GB data when run as user 
root
> in command prompt. When same script is scheduled in cron for 2345 hrs (weekly),
> script runs and transfer say 18GB of data and terminates with error
426 Connection closed; Not Enough Disk Space. Aborting..

How do you know that it gives the error "426 connection closed"? Do you check the cron logs or get an email from cron? Are you logging the error somewhere? What does your cron line show - if you can share that (you may hide the script name).

Also, about the 2345 Hrs weekly part - I'm sure you would have tested it at other times also. Can you check, thru cron, at some other time than 2345 Hrs, to upload the file, and simultaneously monitor the local and remote server about which file systems are being filled up. That can give some indication about what next to check. This would work if you have shell access to both the servers. For e.g. /tmp is getting filled up and then it is transferring to say /data/filename.tar.gz

I understand the script being run manually works, but not thru cron. Maybe thru cron the $PATH is not available and the desired binaries are not usable. You may be using "expect" scripts, or php/python to do the ftp and their paths are incorrect (as an example your version of php is installed in /usr/local/bin/php, and the system is taking /usr/bin/php).

Last, the yahoo account that you're using somehow mangles the e-mails, and becomes difficult quoting it. Maybe you can shift to plain text while replying to the e-mail, would help.

Regards
Vivek Kapoor
http://exain.com

_______________________________________________
ilugd mailinglist -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/

Reply via email to