Long running shell scripts shuts donw the machine!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Long running shell scripts shuts donw the machine!
# 1  
Old 11-07-2008
Long running shell scripts shuts donw the machine!

Hi, I am very new to shell scripting.
I have a script called "RunDMol3.sh" which takes a directory name as input parameter, process somthing using files in the folder and writes output files in the same folder. This is a very heavy job and takes about 1.5 hrs.
When I run in manually the script runs well and output files are generated successfully.
There are about 64 such directories. So I wrote a script called "serial_script.sh" that would go through all such directories and execute "RunDMol3.sh" one after the other.
This script is executed as

nohup ./serial_script.sh &

But I dont know why after running some few jobs the linux system crashes! Are there any memory related issue? Or am I missing something? how can i find the reason of system crash? Below is the script I am running. Thanks in advance. Below is the script.sh I am running.

#! /bin/bash
exec > log.txt 2>&1
echo "Starting to run all jobs"

cd directory1/
RunDMol3.sh directory1
cd ..
echo "1 of 64 jobs completed (directory1)"

cd directory2/
RunDMol3.sh directory2
cd ..
echo "2 of 64 jobs completed (directory2)"

cd directory3/
RunDMol3.sh directory3
cd ..
echo "3 of 64 jobs completed (directory3)"
.
.
.
.
cd directory64/
RunDMol3.sh directory64
cd ..
echo "64 of 64 jobs completed (directory64)"
echo ______________________________________
echo "Atempted to run All jobs"
# 2  
Old 11-07-2008
First create the log file for the following.
nohup ./serial_script.sh > /tmp/serial_script.log &
Put more debug statement.
Check this log after which directory the system goes down.

Also you can check the system performance using "w". It will show the load average. This cmd will work in sun os.

Thanks
Sarwan
# 3  
Old 11-07-2008
Are you getting a core dump when the system crashes?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check status of long running multiple curl commands in shell script

I am working on script. it reads a file which contains multiple lines Ex; curl --write-out %{http_code} --silent --output /dev/null http://hostname:port/input=1 curl --write-out %{http_code} --silent --output /dev/null http://hostname:port/input=2 curl --write-out %{http_code} --silent ... (2 Replies)
Discussion started by: oraclermanpt
2 Replies

2. OS X (Apple)

Quit a shell script thats running on a remote machine

I'm in a situation where I am executing a shell script(Bash) on another machine remotely using ssh, and for various reasons sometimes need to quit it and restart it. The shell script being run does many different things, so its hard to know what process to kill on the remote machine, and even if I... (2 Replies)
Discussion started by: TheDrizzle
2 Replies

3. Shell Programming and Scripting

Running shell scripts from command

I have written a few shellscripts to run a videogame (starcraft) at different patched versions. For example bw113 runs the 1.13 version of the game. These works perfectly when I run them from command line (./bw113). However I cannot get it to work via mouseclick. Some Information: - I have... (5 Replies)
Discussion started by: lordsloth
5 Replies

4. Shell Programming and Scripting

Automatic running of Shell scripts

Hi, I have this problem of merging 2 shell scripts and run it one after the other. For eg: script A runs to give OutputA. This OutputA should become the input of script B which will run to give OuputB. Now this has to happen automatically i.e, script A and script B should run consecutively one... (1 Reply)
Discussion started by: Vindhyaauri
1 Replies

5. Programming

running PLSQL scripts through shell script

I am running the following ealth checks on my server there are two databases in my server . MODEL1 and MODEL2 i connect with the first database as sqlplus model1/password Then i exceute a query select x from table (4 Replies)
Discussion started by: asalman.qazi
4 Replies

6. UNIX for Advanced & Expert Users

Problem in running bash shell commands on HP-UX machine

Hello All, After login to the server we are explicitly calling /usr/local/bin/bash to activate bash shell properly. But since commands are not executing properly so I think it is not initialized well. I am facing following problems: 1) If I want to have a look on a particular file using tail... (6 Replies)
Discussion started by: abhishek0071
6 Replies

7. Shell Programming and Scripting

Running shell scripts from web browser

I am in need of a mechanism to run shell scripts from web browser. Could any one of you guide me as to which technology to choose? I have some scripts which take some arguments. Appreciate you response. (7 Replies)
Discussion started by: corleone
7 Replies

8. UNIX for Dummies Questions & Answers

running vendor shell scripts

Does anyone run a lot of SH (shell script) commands from vendors. i.e... product installations. And do you edit/change as a rule of thumb? I done a lot of product installs and some tend to think we should edit/change a vendors SH script. I am just looking for your thoughts. Thanks. (1 Reply)
Discussion started by: Javagate
1 Replies

9. UNIX for Dummies Questions & Answers

Running shell scripts on a remote server

Hi - I am running Mac OS X (Terminal) at my current workstation, and I would like to telnet to my local server to run a shell script. The local server is a Solaris machine (don't know the version or the type of Unix being run on it, sorry.) The problem I have is that when I create a #!/bin/sh... (2 Replies)
Discussion started by: pepintheshort
2 Replies

10. UNIX for Dummies Questions & Answers

Cron running shell scripts.

What are the rules of calling shell scripts in cron. How do I go about setting up the correct PATHS that calls a script, which then calls another sub script all of which has to retain the orginal PATHS and VARS that I've set up in first script Confused.. ok Well Cron calls a script... (3 Replies)
Discussion started by: cfoxwell
3 Replies
Login or Register to Ask a Question