Template:SQWareProduction sqwcas RollingRestart.ksh example

From Wiki_dbSQWare
Jump to: navigation, search
Sourcing sqwcas_Global.lib v2024.03 SQWareProduction for Cassandra (dbSQWare) ... 

#Standard help for script sqwcas_RollingRestart.ksh:

$gvsqw_CasBin/sqwcas_RollingRestart.ksh -h
#Display online help for this script

$gvsqw_CasBin/sqwcas_RollingRestart.ksh -Locale en -h
#Display online help for this script with forcing of the 'en' locale (by default locale managed by $gvsqw_Locale)

$gvsqw_CasBin/sqwcas_RollingRestart.ksh -s
#Display usage examples for this script

$gvsqw_CasBin/sqwcas_RollingRestart.ksh -I $CAS_SID -A <Action> -S <scope>
#Display generated commands without execute them !

$gvsqw_CasBin/sqwcas_RollingRestart.ksh -I $CAS_SID -A <Action> -S <scope> -Exec
#Execute action <Action> (start, stop, restart is default) on the instance $CAS_SID and for the <scope> selected : All, AllDC (by default is locale) or -Dynamic

$gvsqw_CasBin/sqwcas_RollingRestart.ksh -I CAS_01 -A 'stop' -Dynamic -Wait 42 -Exec
#Execute stop on the instance CAS_01, for dynamic discovery of nodes and wait 42 secondes between each retart

$gvsqw_CasBin/sqwcas_RollingRestart.ksh -I $CAS_SID -S <scope> -Timeout 1500 -Exec
#Timeout in seconds for kill inactive ssh session (by default is 7200, manage by $gvsqw_TimeOutStop)

$gvsqw_CasBin/sqwcas_RollingRestart.ksh -I $CAS_SID -AddMail 'mymail1@mydomaine.com,mymail2@mydomaine.com' -Exec
#Add the mail list to the default address managed by $gvsqw_GlobalMail (only this time), if needed separate by commas

$gvsqw_CasBin/sqwcas_RollingRestart.ksh -I $CAS_SID -SendReport -Exec
#Send the log by email at the end of the treatment even if there is no error

$gvsqw_CasBin/sqwcas_RollingRestart.ksh -I $CAS_SID -NoMail -Exec
#Disables sending an email on error to $gvsqw_GlobalMail (by default, send on error)

$gvsqw_CasBin/sqwcas_RollingRestart.ksh -I $CAS_SID -FRT <NumericValue> -Exec
#Force return code to '<NumericValue>' on error (if no error, "exit 0!")
#You can also force return code of this script on all your
#environnement if you set the variable: $gvsqw_ForcedReturnCodeScript_sqwcas_RollingRestart=<NumericValue>
#in configuration file $gvsqw_CasBin/../etc_cust/sqwcas_GlobalVar.cfg