Get information about Veritas InfoScale using CLI in RHEL

 

If you are using Veritas InfoScale or Veritas Cluster Service in your environment, know that you can use the CLI to collect all useful information about your cluster.

The following commands is part of my shell script collect-exec.sh, make your changes to fit your needs.

# global collect directory.
collect_path=/var/tmp/collect_$(uname -n)_$(date +"%d%m%Y")

# check if HAD is running. 
check_vcs_had=$(ps -ef | egrep -w "VRTSvcs/bin/had");

# if HAD is running export the right PATH
if [ ! -z "$check_vcs_had" ] ; then
export PATH=${PATH}:/opt/VRTSvcs/bin:/opt/VRTS/bin:/opt/VRTSsfmh/bin:/etc/vx/bin
fi
# Display every command to create this main.cf from begin. 
hacf -verify /etc/VRTSvcs/conf/config/ -display > ${collect_path}/hacf_verify_display.txt

# Display the HAD version
had -version > ${collect_path}/had_version.txt

# Display all cluster users
hauser -display > ${collect_path}/hauser_display.txt

# List all cluster users
hauser -list > ${collect_path}/hauser_list.txt

# List all nodes in the cluster
hasys -list > ${collect_path}/hasys_list.txt

# Display the current state of all nodes in the cluster
hasys -state > ${collect_path}/hasys_state.txt

# Display the node number of all cluster nodes
hasys -nodeid > ${collect_path}/hasys_nodeid.txt

# Display the complete summary of the cluster
hastatus -summ > ${collect_path}/hastatus_summ.txt

# Display all clusters attributes
hatype -display > ${collect_path}/hatype_display.txt

# List all cluster attributes
hatype -list > ${collect_path}/hatype_list.txt

# List all resources in the cluster
hares -list > ${collect_path}/hares_list.txt

# Display all service groups in the cluster
hagrp -list > ${collect_path}/hares_list.txt

# Display the product version 
haclus -value EngineVersion > ${collect_path}/haclus_engineversion.txt

# Display the cluster name 
haclus -display > ${collect_path}/haclus_display.txt

# Display all imported disks in Storage Foundation
vxdisk list > ${collect_path}/vxdisk_list.txt

# Display all imported or exported disks in Storage Foundation
vxdisk -o alldgs list > ${collect_path}/vxdisk_o_alldgs_list.txt

# Display information about cluster file system
vxdctl -c mode > ${collect_path}/vxdctl_c_mode.txt
vxdctl mode > ${collect_path}/vxdctl_mode.txt
vxclustadm -v nodestate > ${collect_path}/vxclustadm_nodestate.txt
vxclustadm nidmap > ${collect_path}/vxclustadm_nidmap.txt
vxclustadm -v nodestate -d > ${collect_path}/vxclustadm_v_nodestate.txt

# Display information about GAB port membership
gabconfig -a > ${collect_path}/gabconfig_a.txt
gabconfig -W > ${collect_path}/gabconfig_W.txt

# Display the heartbeat links 
lltstat > ${collect_path}/lltstat.txt
lltstat -nvv active > ${collect_path}/lltstat_active.txt
lltstat -n > ${collect_path}/lltstat_n.txt
lltconfig -W > ${collect_path}/lltconfig_W.txt

# Display information about cluster file system 
cfscluster status > ${collect_path}/cfscluster_status.txt

# Display information about disk groups
vxdg list > ${collect_path}/vxdg_list.txt && vxdg free > ${collect_path}/vxdg_free.txt

# Display information about VxVM 
vxprint -ht > ${collect_path}/vxprint_ht.txt
vxprint -Ath -q > ${collect_path}/vxprint_Athq.txt
vxprint -AGts > ${collect_path}/vxprint_AGts.txt
vxprint -m rootdg > ${collect_path}/vxprint_m_rootdg.txt

# Display information about fencing 
vxfenadm -d > ${collect_path}/vxfenadm_d.txt

# Display information about VxDMP 
vxdmpadm gettune all > ${collect_path}/vxdmpadm_gettune_all.txt
vxdmpadm listapm all > ${collect_path}/vxdmpadm_listapm_all.txt
vxdmpadm listenclosure all > ${collect_path}/vxdmpadm_listenclosure_all.txt
vxdmpadm stat restored > ${collect_path}/vxdmpadm_stat_restored.txt
vxdmpadm listctlr all > ${collect_path}/vxdmpadm_listctlr_all.txt
vxdmpdbprint > ${collect_path}/vxdmpdbprint.txt
vxddladm get namingscheme > ${collect_path}/vxddladm_namingscheme.txt
vxddladm listjbod > ${collect_path}/vxddladm_listjbod.txt
vxddladm listsupport > ${collect_path}/vxddladm_listsupport.txt

# Display the product license
vxlicense -p > ${collect_path}/vxlicense_p.txt
vxlicrep > ${collect_path}/vxlicrep.txt
vxlicrep -e > ${collect_path}/vxlicrep_e.txt

# Display all attributes from each resource
for a in $(/opt/VRTSvcs/bin/hares -list | awk '{print $1}') ; do
hares -display $a > ${collect_path}/hares_display.txt
done

# Display all attributes from each service group
for a in $(/opt/VRTSvcs/bin/hagrp -list | awk '{print $1}') ; do
hagrp -display $a > ${collect_path}/hagrp_display.txt
done

 

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s