Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
We have an issue and need some expert advise. In one of the linux servers, we are running some cron jobs. This cron job loads flat files in to a table in a oracle database using a shell script. This was working fine. Recently we did an upgrade to kernel version and after that it loads the data half way and stops the cron job. (e.g. if there are 100 files, it loads about 13 files and stops). No error anywhere. Assuming that error is due to the kernerl issue we reversed the patch also. But still the problem is still there.
When you execute the file upload shell script manually then it works fine.
This is the OS details of the server
OS name: Red Hat Enterprise Linux ES release 4 (Nahant Update 6)
Kernel version: kernel-smp-2.6.9-89.0.23.EL
Current Kernel version: Linux CCOLDWHZDBOP01 2.6.9-89.0.23.ELsmp #1 SMP Fri Mar 5 17:56:21 EST 2010 i686 i686 i386 GNU/Linux
If a cron job works fine manually, but not from cron, its usually because the path and environment variables are different when run by cron. Example, if a script uses tar, and tar is in your normal users path, then the script will work fine when run manually by that user. If tar is not in crons path, cron will not find tar and the script will fail when run automatically by cron. The update might have changed the way cron handles it's path and env variables. Something to investigate.
If the script you use only has one command, then this cron/path/env would probably not be the issue since it obviously found the command for at least 13 rows. If your script is long, and it inserts records at different places in the script, then the script is probably using some command not found in crons path.
Its not that cron does not run at all. It uploads few files from the list and then stops. No errors on any logs. As i have mentioned above if i submit 100 files it uploads few like 13 - 15. When you run the same scrip in command prompt it uploads all 100 files.
So it cant be an environment variable since it's able to execute half way isn't it ?