Hi folks!
I'm starting to get pretty good at this, I still have a question left. I can't seem to figure out how to start a script from the top once it completes...
SunOS 5.7 with Bash 2.01.
Here's a "schedule" of my script:
1. First I have some functions declared
2. The functions are... (2 Replies)
Hi
I have a script as follows
Function func0
<Set of validations done>
Function Func1
<Set of commands and some of the variables set>
Function Func2
<Set of commands and some of the varibales set>
Function Func3
<Call a job(It is a datastage job which is called>
Main job
Call func0... (2 Replies)
Hello, I created a shell script in /etc/init.d and it already runs at boot. However I cannot figure out how to make it run just like typing "scrip_name start"
I can run it like this ./script_name but since I am doing remote log in whenever I log off the script stops and I also don't want to run... (8 Replies)
How can I get a script to complete a update, varifiy completion, resboot, and continue with script?
Is it possbile to get script to add itself to the "startup application" list
#!/bin/bash
clear
sudo apt-get update
#Verify/test the update completed
#Reboot
#Start/comtinue... (9 Replies)
Hello,
I have a shell script which calls for an existing script with appropriate parameters. It looks something like this.
--------------------------------------------------------------------------
#!/bin/bash
sh /root/ams_rc stop_shepherd > /dev/null
sleep 30
sh /root/ams_rc... (9 Replies)
I have written a script which checks for a file if that is being updated or not. If the files is not being updated then it will restart the process.
#!/bin/sh
DATE=`date +%Y%m%d%H%M%S`
LOG_FILE=/var/xmp/log/XMP_*
INCEPT=`ls -l $LOG_FILE |awk '{print $5}'`
PROC=`xms show pr |grep -i... (3 Replies)
Hi Guys,
I need bash script to restart the service.
1. Disable the service called SASM
svcadm disable sasm
2. if service went to maintenance mode then it shuld clear it with below command
svcadm clear sasm
3.or else it should restart the mysql service
/etc/init.d/mysql stop... (1 Reply)
I am using blow script :--
#!/bin/bash
FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not
if
then
# echo "process found"
exit 0;
else
echo "process not found"
exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
I have a question regarding the restart logic in scripts.
I have a script named "JOB1" which has 5 steps and every step has a program.
Suppose my script fails at 4th step and the first 3 steps have completed successfully. I want to start my script from 4th step directly without doing any change... (1 Reply)
Discussion started by: champ2108
1 Replies
LEARN ABOUT DEBIAN
opal-restart
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)