Purpose
Runs an action on a resource class.
Syntax
runact -s "selection_string"
[ -N { node_file │ "-" }
] [-f resource_data_input_file]
[-l │ -t │ -d │ -D delimiter]
[-x] [-h] [-TV]
resource_class action [in_element=value…]
[rsp_element…]
runact
-r [-f resource_data_input_file]
[-l │ -t │ -d │ -D delimiter]
[-x] [-h] [-TV]
resource_handle action [in_element=value…] [rsp_element…]
runact -c [-f resource_data_input_file]
[-n node_name]
[-l │ -t │ -d │ -D delimiter]
[-x] [-h] [-TV]
resource_class action [in_element=value…]
[rsp_element…]
runact -C domain_name…
[-f resource_data_input_file]
[-l │ -t │ -d │ -D delimiter]
[-x] [-h] [-TV]
resource_class action [in_element=value…]
[rsp_element…]
Description
The runact command
requests that the RMC subsystem run the specified action on the specified
resource class.
Instead of specifying multiple node names in selection_string,
you can use the -N node_file
flag to indicate that the node names are in a file. Use -N
"-" to read the node names from standard input.
Before
you run this command, use the lsactdef command
to list the resource class actions that are supported by this resource
class. Also, use the lsactdef command to
list the required input action elements that must be specified when
invoking an action. The lsactdef command
also identifies the data type for each input element. The value specified
for each input element must match this data type.
Flags
- -c
- Invokes the action on the resource class.
To invoke the class
action on a globalized resource class on all peer domains defined
on the management server, set CT_MANAGEMENT_SCOPE=3 and use
the -c flag.
- -C domain_name…
- Invokes a class action on a globalized resource class on one or
more RSCT peer domains that are defined on the management server.
Globalized classes are used in peer domains and management domains
for resource classes that contain information about the domain.
- -f resource_data_input_file
- Specifies the name of the file that contains resource action input
elements and values. Use the lsactdef command
with the -i flag to generate a template
for this input file.
- -d
- Specifies delimiter-formatted output. The default delimiter is
a colon (:). Use the -D flag if you want
to change the default delimiter.
- -D delimiter
- Specifies delimiter-formatted output that uses the specified delimiter.
Use this flag to specify a delimiter other than the default colon
(:). An example is when the data to be displayed contains colons.
Use this flag to specify a delimiter of one or more characters.
- -l
- Specifies "long" format — one entry per line. This is the default
display format.
- -n node_name
- Specifies the name of the node on which to run the class action.
You can only use this flag in conjunction with the -c flag.
- -N { node_file │ "-" }
- Specifies that node names are read from a file or from standard
input. Use -N node_file to
indicate that the node names are in a file.
- There is one node name per line in node_file
- A number sign (#) in column 1 indicates
that the line is a comment
- Any blank characters to the left of a node name are ignored
- Any characters to the right of a node name are ignored
Use -N "-" to read the node names
from standard input. The CT_MANAGEMENT_SCOPE environment variable
determines the scope of the cluster. If CT_MANAGEMENT_SCOPE is not
set, management domain scope is chosen first (if a management domain
exists), peer domain scope is chosen next (if a peer domain exists),
and then local scope is chosen, until the scope is valid for the
command. The command runs once for the first valid scope it finds.
For example, if a management domain and a peer domain both exist
and CT_MANAGEMENT_SCOPE is not set, this command applies to the
management domain. If you want this command to apply to the peer
domain, set CT_MANAGEMENT_SCOPE to 2.
- -r "resource_handle"
- Specifies a resource handle. The resource handle must be specified
in this format:
"0xnnnn 0xnnnn 0xnnnnnnnn 0xnnnnnnnn 0xnnnnnnnn 0xnnnnnnnn"
where
n is a hexadecimal character. Use this flag to invoke the action on
the resource that matches resource_handle.
- -s "selection_string"
- Specifies a selection string. All selection strings must be enclosed
within either double or single quotation marks. If the selection string
contains double quotation marks, enclose the entire selection string
in single quotation marks. For example:
-s 'Name == "testing"'
-s 'Name ?= "test"'
Only persistent attributes can
be listed in a selection string. For information on how to specify
selection strings, see the Administering RSCT.
- -t
- Specifies table format. Each attribute is displayed in a separate
column, with one resource per line.
- -x
- Suppresses header printing.
- -h
- Writes the command's usage statement to standard output.
- -T
- Writes the command's trace messages to standard error. For your
software-service organization's use only.
- -V
- Writes the command's verbose messages to standard output.
Parameters
- action
- Specifies the name of the action to be invoked.
- in_element=value…
- Specifies the action input element names and values. If you use
the -f flag, don't enter any in_element=value pairs
on the command line.
in_element is any
of the input structured data element names. There should be one in_element_n=value pair
for each of the defined structured data (SD) input elements for the
specified action. Use lsactdef with the -s
i flag to list the input elements for a particular
resource class and action. Use lsactdef -i to
generate an input file template, which, after appropriate editing,
can be used as the input file.
value must
be the appropriate datatype for the specified element. For example,
if NodeNumber is defined as a uint32 datatype,
enter a positive numeric value.
- resource_class
- Specifies the name of the resource class with the actions that
you want to invoke.
- resource_handle
- Specifies the resource handle for the resource and class with
the actions that you want to invoke.
- rsp_element
- Specifies one or more of action response structured data element
names. If you specify one or more element names, only those elements
are displayed in the order specified. If you do not specify any element
names, all elements of the response are displayed.
Security
This command requires root authority.
Exit Status
- 0
- The command has run successfully.
- 1
- An error occurred with RMC.
- 2
- An error occurred with the command-line interface (CLI) script.
- 3
- An incorrect flag was specified on the command line.
- 4
- An incorrect parameter was specified on the command line.
- 5
- An error occurred with RMC that was based on incorrect command-line
input.
Environment Variables
- CT_CONTACT
- When the CT_CONTACT environment variable is set to a host name
or IP address, the command contacts the Resource Monitoring and Control
(RMC) daemon on the specified host. If the environment variable is
not set, the command contacts the RMC daemon on the local system where
the command is being run. The resource class or resources that are
displayed or modified by the command are located on the system to
which the connection is established.
- CT_IP_AUTHENT
- When the CT_IP_AUTHENT environment variable exists, the RMC daemon
uses IP-based network authentication to contact the RMC daemon on
the system that is specified by the IP address to which the CT_CONTACT
environment variable is set. CT_IP_AUTHENT only has meaning if CT_CONTACT
is set to an IP address; it does not rely on the domain name system
(DNS) service.
- CT_MANAGEMENT_SCOPE
- Determines the management scope that is used for the session with
the RMC daemon to monitor and control the resources and resource
classes. The management scope determines the set of possible target
nodes where the resources and resource classes can be monitored and
controlled. The valid values are:
- 0
- Specifies local scope.
- 1
- Specifies local scope.
- 2
- Specifies peer domain scope.
- 3
- Specifies management domain scope.
If this environment variable is not set,
local scope is used.
Implementation Specifics
This command is
part of the Reliable Scalable Cluster Technology (RSCT) fileset
for AIX®.
Standard Output
When the -h flag
is specified, this command's usage statement is written to standard
output.
The command output and all verbose messages are written
to standard output.
Standard Error
All trace messages are written
to standard error.
Examples
- To invoke the TestClassAction resource class action on
the resource class IBM.Example, enter:
runact -c IBM.Example TestClassAction Int32=99
The
output will look like this: Resource Class Action Response for: TestClassAction
sd_element 1:
Int32 = 99
Location
- /usr/sbin/rsct/bin/runact
- Contains the runact command