Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Need to get out of 2 variables in scripts Post 303037123 by amar1208 on Wednesday 24th of July 2019 08:27:35 AM
Old 07-24-2019
Hi Bala,


srvctl config database -d $CURRENT_COB ---(which need to get output from node2 )
but i fire directly on node2
srvctl config database -d XYX ---- i am getting the output as below
PRIMARY

it is passing variable of $PRIMARY_CONF and but the not the $STANDBY_CONF
in the script it is passing the empty value in $STANDBY_CONF

Last edited by Don Cragun; 07-24-2019 at 09:42 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

executing variables in ksh scripts?

In a ksh script on an AIX box running a jillion oracle database processes, I'm setting a variable to one of two possible arguments, depending on cmd line arguments. FINDIT="ps -ef | grep oracle | grep DBexport | grep rshrc" -or- FINDIT="ps -ef | grep oracle | grep prod | grep runback" I... (3 Replies)
Discussion started by: zedmelon
3 Replies

2. UNIX for Dummies Questions & Answers

Variables in scripts

Just a quick question. If I have a script that calls another script while running, is it possible for the second script to reference a variable in the first script and if so, how. Is it scriptname.sh:$VARIABLE for a global variable and can you do scriptname.sh:function $VARIABLE or am I off my... (1 Reply)
Discussion started by: kirkm76
1 Replies

3. Shell Programming and Scripting

How to access variables across scripts

Hi All, I have declared a variable in script1 and assign a value for it. In script2 i'll call script1 and then I want the value of variables set in script1. I have tried with export, but in vain. How can I achive this? Below is the two scripts. --script1 #!/usr/bin/ksh echo $1... (1 Reply)
Discussion started by: javaDev
1 Replies

4. UNIX for Dummies Questions & Answers

Passing variables between scripts...

Hey all, I'm wondering how you pass variable's that are defined in one script to another script that's been called by that first script..... Best regards, Jaz (1 Reply)
Discussion started by: Jazmania
1 Replies

5. Shell Programming and Scripting

Passing variables between scripts

Hi all. I need to pass a value from a script that runs in a sub-shell, back into the calling shell like below (or into script 2 directly): outer_script export param=value1 script1 $param (in script1: export param=value2) script2 $param ($param is now value1, not value2... (4 Replies)
Discussion started by: bbergstrom74
4 Replies

6. Shell Programming and Scripting

Scope of variables between scripts

Friends, I am using ksh under SunoS. This is what I have In file1.sh NOW=$(date +"%b-%d-%y") LOGFILE="./log-$NOW.log" I will be using this file through file1.sh as log file. I have another script file2.sh which is being called inside my file1.sh. I would like to use the same log... (6 Replies)
Discussion started by: dahlia84
6 Replies

7. UNIX for Advanced & Expert Users

How to make the variables of one script available for the other scripts?

Hello Everyone, I want to know how can we make the variables of one script available for the other script? for example i have three scripts variable_availability.sh,first.sh,second.sh and a file containing variables called common ---------------------------------- cat variable_availability.sh... (2 Replies)
Discussion started by: Kesavan
2 Replies

8. Shell Programming and Scripting

How to declare variables once and reuse them in other scripts?

Hello everyone. I'm trying to create a conf file with variables that my other scripts will use. I have several scripts that use the same variables, and since I don't know how to read them from an external file, i define them in each script (and then if i want to change one's value i need to... (4 Replies)
Discussion started by: moshe88
4 Replies

9. Shell Programming and Scripting

Passing variables between sub-scripts

I have written a program for some data analysis. It is gettin long. I would like to restructure it so that i can have a master file which controls multiple subscripts in order to make it easier to understand. I need to be able to define variables in the master script which are used by all three... (2 Replies)
Discussion started by: carlr
2 Replies

10. Shell Programming and Scripting

How to pass variables between scripts?

Hello, I have two bash scripts like the following: script 1: #!/bin/bash var=WORLD bash path/to/second/script/script2.bash script 2: #!/bin/bash echo "HELLO $var" I expected the output to be "HELLO WORLD" but instead, I get "HELLO". I understand that when I envoke another bash... (2 Replies)
Discussion started by: jl487
2 Replies
STONITH(8)						  System administration utilitie						STONITH(8)

NAME
stonith - extensible interface for remotely powering down a node in the cluster SYNOPSIS
stonith -h stonith [-s] [-h] -L stonith [-s] [-h] -t stonith-device-type -n stonith [-s] [-h] -t stonith-device-type {name=value... | -p stonith-device-parameters | -F stonith-device-parameters-file} [-c count] [-l] [-S] stonith [-s] [-h] -t stonith-device-type {name=value... | -p stonith-device-parameters | -F stonith-device-parameters-file} [-c count] [-T {reset | on | off}] [nodename] DESCRIPTION
The STONITH module provides an extensible interface for remotely powering down a node in the cluster (STONITH = Shoot The Other Node In The Head). The idea is quite simple: when the software running on one machine wants to make sure another machine in the cluster is not using a resource, pull the plug on the other machine. It's simple and reliable, albeit admittedly brutal. OPTIONS
The following options are supported: -c count Perform any actions identified by the -l, -S and -T options count times. -F stonith-device-parameters-file Path of file specifying parameters for a stonith device. To determine the syntax of the parameters file for a given device type run: # stonith -t stonith-device-type -n All of the listed parameters need to appear in order on a single line in the parameters file and be delimited by whitespace. -h Display detailed information about a stonith device including description, configuration information, parameters and any other related information. When specified without a stonith-device-type, detailed information on all stonith devices is displayed. If you don't yet own a stonith device and want to know more about the ones we support, this information is likely to be helpful. -L List the valid stonith device types, suitable for passing as an argument to the -t option. -l List the hosts controlled by the stonith device. -n Output the parameter names of the stonith device. name=value Parameter, in the form of a name/value pair, to pass directly to the stonith device. To determine the syntax of the parameters for a given device type run: # stonith -t stonith-device-type -n All of the listed parameter names need to be passed with their corresponding values. -p stonith-device-parameters Parameters to pass directly to the stonith device. To determine the syntax of the parameters for a given device type run: # stonith -t stonith-device-type -n All of the listed parameter names need to appear in order and be delimited by whitespace. -S Show the status of the stonith device. -s Silent operation. Suppress logging of error messages to standard error. -T action The stonith action to perform on the node identified by nodename. Chosen from reset, on, and off. Note If a nodename is specified without the -T option, the stonith action defaults to reset. -t stonith-device-type The type of the stonith device to be used to effect stonith. A list of supported devices for an installation may be obtained using the -L option. -v Ignored. EXAMPLES
To determine which stonith devices are available on your installation, use the -L option: # stonith -L All of the supported devices will be displayed one per line. Choose one from this list that is best for your environment - let's use wti_nps for the rest of this example. To get detailed information about this device, use the -h option: # stonith -t wti_nps -h Included in the output is the list of valid parameter names for wti_nps. To get just the list of valid parameter names, use the -n option instead: # stonith -t wti_nps -n All of the required parameter names will be displayed one per line. For wti_nps the output is: ipaddr password There are three ways to pass these parameters to the device. The first (and preferred) way is by passing name/value pairs on the stonith command line: # stonith -t wti_nps ipaddr=my-dev-ip password=my-dev-pw ... The second way, which is maintained only for backward compatibility with legacy clusters, is passing the values in order on the stonith command line with the -p option: # stonith -t wti_nps -p "my-dev-ip my-dev-pw" ... The third way, which is also maintained only for backward compatibility with legacy clusters, is placing the values in order on a single line in a config file: my-dev-ip my-dev-pw ... and passing the name of the file on the stonith command line with the -F option: # stonith -t wti_nps -F ~/my-wtinps-config ... To make sure you have the configuration set up correctly and that the device is available for stonith operations, use the -S option: # stonith -t wti_nps ipaddr=my-dev-ip password=my-dev-pw -S If all is well at this point, you should see something similar to: stonith: wti_nps device OK. If you don't, some debugging may be necessary to determine if the config info is correct, the device is powered on, etc. The -d option can come in handy here - you can add it to any stonith command to cause it to generate debug output. To get the list of hosts controlled by the device, use the -l option: # stonith -t wti_nps ipaddr=my-dev-ip password=my-dev-pw -l All of the hosts controlled by the device will be displayed one per line. For wti_nps the output could be: node1 node2 node3 To power off one of these hosts, use the -T option: # stonith -t wti_nps ipaddr=my-dev-ip password=my-dev-pw -T off node SEE ALSO
heartbeat(8), meatclient(8) AUTHORS
Alan Robertson <alanr@unix.sh> stonith Simon Horman <horms@vergenet.net> man page Florian Haas <florian.haas@linbit.com> man page cluster-glue 1.0.5 December 7, 2009 STONITH(8)
All times are GMT -4. The time now is 05:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy