jacl script for websphere server startup synchronization check

ibm websphere

Below JACL script can be used to check if server startup sync is enabled or not.

#————————————————————–
# Find out if serverStartupSyncEnabled is true for this node
# We just created this server, so if this attribute is set to
# “false” we have to perform a sync. If we do not, the node we
# are installing on may have an out-of-date copy of the config
# data.
#————————————————————–
proc chk_SyncNode {} {

puts “checklist: — Getting the MBean for syncronisation …”
set nodeSync [$AdminControl completeObjectName type=NodeSync,node=$nodeName,*]
set enabled [$AdminControl getAttribute $nodeSync serverStartupSyncEnabled]
if { [string compare $enabled “false”] == 0 } {
puts “checklist: — Invoking synchronization for node $nodeSync because serverStartupSyncEnabled is set to false…”
$AdminControl invoke $nodeSync sync
puts “checklist: — Done with synchronization.”
return 1;
} else {
puts “checklist: — Error during syncronization.”
puts “checklist: — Manual Sync recomeneded.”
return 0
}}

Script to check nodeSync MBean available on this node

#————————————————————–
# — is a nodeSync MBean available on this node?
#————————————————————–
proc chk_Mbean_Avail {} {

puts “checklist: — checking for the existence of a NodeSync MBean on node $nodeName”
set nodeSync [$AdminControl completeObjectName type=NodeSync,node=$nodeName,*]
if { [llength $nodeSync] == 0 } {
puts “checklist: — Error — NodeSync MBean not found for name $nodeName”
return 0
} else {
puts “checklist: — NodeSync MBean Found for nodeName $nodeName”
return 1
}}

#————————————————————–
# do some sanity checking
# — do we have a node by this name?
#————————————————————–
proc chk_Node {} {

set mynode [$AdminConfig getid /Node:$nodeName/]
puts “checklist: — checking for existence of node $nodeName”
if { [llength $mynode] == 0 } {
puts “checklist: — node not found for name $nodeName”
return 0
} else {
puts “checklist: — Node found for name $nodeName”
return 1
}}

In case of any ┬ęCopyright or missing credits issue please check CopyRights page for faster resolutions.

Leave a Reply