Sponsored Content
Full Discussion: restart parameter
Top Forums Shell Programming and Scripting restart parameter Post 302498349 by malts18 on Monday 21st of February 2011 05:53:54 AM
Old 02-21-2011
restart parameter

I have a shell script with 4 separate functions taking place, one after the other.
Is there a way to introduce a parameter so that if the job fails, then I can restart it at a specific point in the script ?
Ideally, the default will be null (or 1), so that it will not normally be set, and the script will start at the beginning.
But if the script were to fail between stages 2 and 3, say, then the script could be rerun, with the parameter set to 2.
Many thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how do I make dynamic parameter names? Or get the value of a parameter evaluated twi

Say I write something like the following: var1=1 var2=2 for int in 1 2 do echo "\$var$int" done I want the output to be: 1 2 Instead I get something like: $var1 $var2 (2 Replies)
Discussion started by: Awanka
2 Replies

2. Shell Programming and Scripting

Restart a Service!!

Hello, I am trying to write a script which will monitor few processes(winbind) for cpu utilization, If the process consumes more than say 99% cpu for 3 minutes, I want to run a script to restart the service which forks the process. ---------- Post updated at 11:21 AM ---------- Previous update... (5 Replies)
Discussion started by: linuxaddict7
5 Replies

3. UNIX for Dummies Questions & Answers

Restart a Daemon

Dear expert, How do i restart a daemon ? I know to use the kill <PID> command to shut down the daemon. But after terminate the daemon, how to restart it back ? :confused: Please advice, many thanks in advance !!! :) (2 Replies)
Discussion started by: kseng2002
2 Replies

4. Solaris

sysedge restart

on a solaris box, if somebody restarts sysedge, which log file (path) can we look at to determine if sysedge was restarted or not? Thanks, (1 Reply)
Discussion started by: Pouchie1
1 Replies

5. Red Hat

Restart SMSPI

I know this sounds silly but im not sure where my smspi is located. I want to restart the services but im not sure where to look at. I dont have init.d in my /sbin : # cd /sbin # cd init.d -bash: cd: init.d: No such file or directory Its running at this time: -bash-3.00$ ps -ef... (2 Replies)
Discussion started by: hedkandi
2 Replies

6. Shell Programming and Scripting

Command that takes one parameter and then searches for the passed in parameter

Hi I am looking for a unix command or a small shell script which can takes one parameter and then searches for the passed in the parameter in any or all files under say /home/dev/ Can anyone please help me on this? (3 Replies)
Discussion started by: pankaj80
3 Replies

7. Shell Programming and Scripting

Passing parameter to script, and split the parameter

i am passing input parameter 'one_two' to the script , the script output should display the result as below one_1two one_2two one_3two if then echo " Usage : <$0> <DATABASE> " exit 0 else for DB in 1 2 3 do DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}` done fi (5 Replies)
Discussion started by: only4satish
5 Replies

8. Shell Programming and Scripting

How to get the parameter value from the parameter file in perl?

hi all, i have a parameter file of following format, i want a method which can get the value of specific parameter. parameter file format: <Parameter Name="FileLocationWindows"> <Description> The directory location of the logger file. ... (1 Reply)
Discussion started by: laxmikant.hcl
1 Replies

9. Shell Programming and Scripting

Resolving a parameter which is passed as parameter

Hi, I have the following files. ->cat scr.sh export TMP_DIR=/home/user/folder1 export TMP_DIR_2=/home/user/folder2 while read line do cat "$line" done<file_list.dat ------------------------ -> cat file_list.dat $TMP_DIR/file1.txt $TMP_DIR_2/file2.txt --------------------------- -> cat... (6 Replies)
Discussion started by: barath
6 Replies

10. Shell Programming and Scripting

Call Script with Parameter (that has another parameter)

Hi. How do I achieve this sh /EDWH-DMT02/script/MISC/exec_sql.sh "@/EDWH-DMT02/script/others/CSM_CKC/Complete_List.sql ${file_name}" Complete_List.txt The /EDWH-DMT02/script/MISC/exec_sql.sh has two parameters and it's working fine with this sh /EDWH-DMT02/script/MISC/exec_sql.sh... (7 Replies)
Discussion started by: aimy
7 Replies
OPAL-RESTART(1) 						     Open MPI							   OPAL-RESTART(1)

NAME
opal-restart - Restart a previously checkpointed sequential process using the Open PAL Checkpoint/Restart Service (CRS) Note: This should only be used by the user if the application being restarted is an OPAL-only application. If it is an Open RTE or Open MPI program their respective tools should be used. SYNOPSIS
opal-restart [ options ] <SNAPSHOT HANDLE> Options opal-restart will attempt to restart a previously checkpointed squential process from the snapshot handle reference returned by opal_check- point. <SNAPSHOT HANDLE> The snapshot handle reference returned by opal_checkpoint, used to restart the process. This is required to be the last argument to this command. -h | --help Display help for this command --fork Fork off a new process, which is the restarted process. By default, the restarted process will replace opal-restart process. -w | --where The location of the local snapshot reference. -s | --self Restart this process using the self CRS component. This component is a special case, all other CRS components are automatically detected. -v | --verbose Enable verbose output for debugging. -gmca | --gmca <key> <value> Pass global MCA parameters that are applicable to all contexts. <key> is the parameter name; <value> is the parameter value. -mca | --mca <key> <value> Send arguments to various MCA modules. DESCRIPTION
opal-restart can be invoked multiple, non-overlapping times. This allows the user to restart a previously running sequential process. See opal_crs(7) for more information about the CRS framework and components. When using the self CRS component, the <FILENAME> argument is replaced by the name of the program to be restarted followed by any arguments that need to be passed to the program. For example, if under normal execution we would start our program "foo" as: shell$ setenv OMPI_MCA_crs=self shell$ setenv OMPI_MCA_crs_self_prefix=my_callback_prefix shell$ ./foo arg1 arg2 To restart this process, we may only need to call: shell$ opal-restart --self -mca crs_self_prefix my_callback_prefix ./foo arg1 arg2 This will cause the "my_callback_prefix-restart" function to be called as soon as the program "foo" calls OPAL_INIT. You do not have to call your program with the same argument set as before. There for we could have just as correctly called: shell$ opal-restart --self -mca crs_self_prefix my_callback_prefix ./foo arg3 This depends upon the behavior of the program "foo". SEE ALSO
opal-checkpoint(1), opal_crs(7) 1.4.5 Feb 10, 2012 OPAL-RESTART(1)
All times are GMT -4. The time now is 01:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy