IBM Support

TSAMP - Commands cheatsheet for new Administrator

Technote (FAQ)


Question

As a DBA or a System Admin that is new to TSAMP, what are some of the basic commands that you should know about?

Answer

For a more complete command reference please see the following manuals:

TSAMP Reference Guide 4.1.0.2

RSCT for Multiplatforms 3.2.0

TSAMP Commands:

Data Collection in case of problems:

Included with every TSAMP release is a "Collect Data" script that you would need to run if you intend requesting assistance from IBM Support :
# /usr/sbin/rsct/install/bin/getsadata -all

You can also download the latest version of this script (as well as read usage instructions) via the following URL:
http://www.ibm.com/support/docview.wss?rs=820&uid=swg21285496

Determining the Master RecRM node:

Issue the following command to show you which node is currently hosting the "master" IBM.RecoveryRM daemon :

# lssamctrl -V | grep -i master

TSAMP Version:

There are a few ways to determine what version of TSAMP you are running.

# samversion

# lssamctrl

# lssrc -ls IBM.RecoveryRM

# lsrsrc -Ab -c IBM.CHARMControl

Manual/Automation Mode:

Manual mode allows TSAMP to continue to monitor resources without taking action against them, in other words it will continue to run monitor scripts but will not run either start or stop scripts no matter what the state of the application is in.

To invoke Manual Mode, issue the following command:

# samctrl -M T    #TSAMP Control Manual Mode is True

To disable Manual Mode (resume Automation Mode), issue the following command:

# samctrl -M F    #TSAMP Control Manual Mode is False

To verify the state of your cluster (Manual or Automation Mode) issues the following command (example provided):
# lssamctrl
Displaying SAM Control information:

SAMControl:
        TimeOut                = 60
        RetryCount             = 3
        Automation             = Manual
        ExcludedNodes          = {}
        ResourceRestartTimeOut = 3
        ActiveVersion          = [2.2.0.4,Tue Nov 27 15:52:42 2007]
        EnablePublisher        = EEZ
        TraceLevel             = 31

Also note the above output would show you if any node was excluded from automation.

It should be noted that while TSAMP will take no action to start or stop resources while in Manual Mode, RSCT is still running and can take certain actions (like reboot the server) if it determines that its needed. One instance of this involves CritRsrcProtMethod, for more information please search on "CritRsrcProtMethod and TSAMP".

Issuing and viewing requests:

Requests can be created against resource groups or resource group members, you can list requests with the following command:

# lsrgreq -L

... or to list resource group member requests:

# lsrgreq -L -m

To submit a request, you can issue the following:

# rgreq -o <request_type> <RG or RG member name>

Valid request types are:

start

stop

cancel

move

movecancel

lock

unlock

Starting/Stopping all Resources within all groups:

If you want to change the nominal state of all resources with a single command you can use the following:

To set nominal state of offline for all resource groups:

# chrg -o offline -s 1=1

To set nominal state of online for all resource groups:

# chrg -o online -s 1=1

Note: The "chrg" command changes the persistent resource attributes of a resource and should be used with extreme care, while changing the nominal state is common place, other options for the chrg command are not so.

Locking/Unlocking all Resource Groups:

If you want a fast way to apply a lock or unlock all resource groups you can use the following syntax:

#  rgreq -o lock -s 1=1

#  rgreq -o unlock -s 1=1

Determining Installed vs Active version information:

This information is provided so you can determine that your upgrade/migration has completed successfully. Example below:
salx1:~ # lssrc -ls IBM.RecoveryRM
Subsystem         : IBM.RecoveryRM
PID               : 7549
Cluster Name      : dom1
Node Number       : 1
Daemon start time : Thu Jan 31 08:30:10 2008

Daemon State:
   My Node Name         : salx1
   Master Node Name     : salx1 (node number = 1)
   Our IVN              : 3.2.2.9
   Our AVN              : 3.2.2.1
   Our CVN              : 11961951258 (0x8474c7d35)
   Total Node Count     : 2
   Joined Member Count  : 1
   Config Quorum Count  : 2
   Startup Quorum Count : 1
   Operational Quorum State: PENDING_QUORUM
   In Config Quorum     : FALSE
   In Config State      : TRUE

Note: The entire command output has not been shown.
In this case the IVN (Installed Version Number) and AVN (Active Version Number) match showing that the new FixPack installation was activated and is in use. Just installing a FixPack for TSAMP does not activate it, please check the Administrators and Users Guide for more information.

An Almost Graphical Cluster Status Report:
Use the command "lssam" ... see the example below:


The command displays OpState and Control flag information in different colors unless the "-nocolor" flag is used. The "-top" flag will allow the information to be dynamically updated on your screen continuously so you can watch the state changes of resources as they occur.

To list all defined relationships:
You can issue the following command to list all defined relationships as well as their persistent and dynamic attributes:
# lsrel -Ab

To list all defined equivalencies:
You can issue the following command to list all defined equivalencies as well as their persistent and dynamic attributes:
# lsequ -Ab

RSCT Commands:

RSCT Version:

There are a few ways to determine what version of RSCT you are running.

# lsrpdomain

# lsrpnode

# ctversion

Preparing and creating cluster:

There are two steps that must be taken to create a RSCT cluster:

# preprpnode <node01> <node02> <node03>...

Input the real names of your nodes (hostname) in the brackets. This command must be issued on every node in the cluster that will be a part of the domain/cluster.

# mkrpdomain <domain_name> <node01> <node02> <node03>...

Starting/Stopping your domain:

At times you will find that you need to stop your cluster for maintenance or for another reason. To stop your cluster you issue the following command:

# stoprpdomain <DOMAIN_NAME>

To start it again you would use the following command:

# startrpdomain <DOMAIN_NAME>

At times you may need to stop your domain without taking all your resources offline first, in this case you would have to force the domain to stop. Prior to forcing the stop you should change CritRsrcProtMethod to 5 to ensure that no reboots occur due to daemons exiting abnormally:

# chrsrc -c IBM.PeerNode CritRsrcProtMethod=5

# stoprpdomain -f <DOMAIN_NAME>

When returning to normal operation (post-maintenance) you should return your CritRsrcProtMethod value back to 3.

Checking Status of Domain and Nodes:

To see the current status of your domain and what domains you have configured issue the following command:

# lsrpdomain

If you have a domain online then you can issue the following command to see what nodes are available in the cluster and their status:

# lsrpnode

Listing Communication groups and settings:

To list the defined communication groups issue the following command:

# lscomg

Listing active tiebreaker resource as well as CritRsrcProtMethod:

To list the active tiebreaker resource as well as the value of CritRsrcProtMethod issue the following command:

# lsrsrc -Ab -c IBM.PeerNode

Completely removing all cluster configuration from a node/server:

# /usr/sbin/rsct/install/bin/recfgct

Warning: This will completely remove all cluster configuration from the node it is run on. It will no longer have anything configured from a TSAMP/RSCT point of view and the node will need to be configured from scratch. There is also a change that one or more of the nodes that this is run on will reboot due to core RSCT daemons exiting abnormally, use with caution.

Document information

More support for: Tivoli System Automation for Multiplatforms

Software version: 3.1, 3.2, 3.2.1, 3.2.2, 4.1

Operating system(s): AIX, Linux, Solaris

Software edition: All Editions

Reference #: 1653981

Modified date: 09 November 2015