Template:SQWareProduction sqwcas RollingRestart.ksh example: Difference between revisions

From Wiki_dbSQWare
Jump to navigation Jump to search
m Updated by BatchUser
No edit summary
 
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
<pre>
<pre>
Sourcing sqwcas_Global.lib v2021.06 SQWareProduction for Cassandra (dbSQWare) ...  
Sourcing sqwcas_Global.lib v2025.06 SQWareProduction for Cassandra (dbSQWare) ...  


#Standard help for script sqwcas_RollingRestart.ksh:
#Standard help for script sqwcas_RollingRestart.ksh:
# XXXXX : -S
# XXXXX : -A
# XXXXX : -Timeout
# XXXXX : -Wait


$gvsqw_CasBin/sqwcas_RollingRestart.ksh -h
$gvsqw_CasBin/sqwcas_RollingRestart.ksh -h
Line 14: Line 8:


$gvsqw_CasBin/sqwcas_RollingRestart.ksh -Locale en -h
$gvsqw_CasBin/sqwcas_RollingRestart.ksh -Locale en -h
#Display online help for this script with forcing of the 'fr' locale (default locale managed by the variable gvsqw_Locale)
#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
$gvsqw_CasBin/sqwcas_RollingRestart.ksh -s
#Display usage examples for this script
#Display usage examples for this script


$gvsqw_CasBin/sqwcas_RollingRestart.ksh -AddMail 'mymail1@mydomaine.com,mymail2@mydomaine.com'
$gvsqw_CasBin/sqwcas_RollingRestart.ksh -I $CAS_SID -A <Action> -S <scope>
#Add the mail list to the default address managed by the variable gvsqw_GlobalMail
#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 -SendReport
$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
#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
$gvsqw_CasBin/sqwcas_RollingRestart.ksh -I $CAS_SID -NoMail -Exec
#Deactivate sendmail on error to $gvsqw_GlobalMail (by default, send on error)
#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
$gvsqw_CasBin/sqwcas_RollingRestart.ksh -I $CAS_SID -FRT <NumericValue> -Exec
#Force return code to '<NumericValue>' on error (if no error, exit 0!)
#Force return code to '<NumericValue>' on error (if no error, "exit 0!")
#You can also force return code of this script on all your
#You can also force return code of this script on all your
#environnement if you set the variable: $gvsqw_ForcedReturnCodeScript_sqwcas_RollingRestart=<NumericValue>
#environnement if you set the variable: $gvsqw_ForcedReturnCodeScript_sqwcas_RollingRestart=<NumericValue>
#in configuration file $gvsqw_CasBin/../etc_cust/sqwcas_GlobalVar.cfg
#in configuration file $gvsqw_CasBin/../etc_cust/sqwcas_GlobalVar.cfg
</pre>
</pre>

Latest revision as of 18:51, 1 July 2025

Sourcing sqwcas_Global.lib v2025.06 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