[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 1

chrsrc Command

Purpose

Changes the persistent property values of a resource or resource class.

Syntax

To change the persistent property values of a resource or resource class (-c flag), using data that is entered on the command line:

chrsrc -s "selection_string" [-v] [-a] [-h] [-TV] resource_class prop=value...

chrsrc -r [-v] [-a] [-h] [-TV] resource_handle prop=value...

chrsrc -c [-v] [-a] [-h] [-TV] resource_class prop=value...

To change the persistent property values of a resource or resource class (-c flag), using data that is predefined in an input file:

chrsrc -f resource_data_input_file -s "selection_string" [-v] [-a] [-h] [-TV] resource_class

chrsrc -f resource_data_input_file -r [-v] [-a] [-h] [-TV] resource_handle

chrsrc -f resource_data_input_file -c [-v] [-a] [-h] [-TV] resource_class

Description

The chrsrc command changes the persistent property values for a resource or resource class.

By default, this command changes the resource persistent properties. If you want to change the resource class persistent properties, specify the -c flag.

Only persistent properties that are not designated as "Read Only" can be changed. The underlying resource manager that controls the specified resource determines which properties can be changed by using this command.

Use the -v flag to verify that the attribute names specified by the command line or Resource_Data_Input file are valid persistent attributes for the specified resource and that these attributes do not have a property of "Read Only". When chrsrc is run with the -v flag, the specified attributes are not changed.

After the chrsrc command is run without the -v flag, if any specified attribute could not be changed, it is noted in an error message. If a particular attribute passes when the chrsrc -v command is run, this does not ensure that the attribute can be changed. The underlying resource manager controls which attributes can be changed.

To change the persistent attributes for a resource, use the -r flag to change just the resource linked with the specified Resource_handle, or use the -s flag to change all the resources that match the specified "selection_string".

Flags

-a
Specifies that this command applies to all nodes in the cluster. The cluster scope is determined by the CT_MANAGEMENT_SCOPE environment variable. If it is not set, first the management domain scope is chosen if it exists, then the peer domain scope is chosen if it exists, and then local scope is chosen, until the scope is valid for the command. The command will run once for the first valid scope found. For example, if both a management and peer domain exist, chrsrc -a with CT_MANAGEMENT_SCOPE not set will change the management domain. In this case, to change the peer domain, set CT_MANAGEMENT_SCOPE to 2.
-c
Changes the resource class persistent property values. By default, the resource persistent properties are changed. Use this flag if you want to change the resource class persistent properties.
-f resource_data_input_file
Specifies the name of the file that contains resource property information.
-r
Changes the specific resource that matches the specified 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 may be listed in a selection string. For information on how to specify selection strings, see the RSCT Guide and Reference.

-v
Verifies that all of the specified properties are valid persistent property names that are not designated as "Read Only". The chrsrc command cannot verify that all of the properties specified on the command line or in the input file can be changed. The underlying resource manager that controls the specified resource determines which properties can be changed. After this command is run (without the -v flag), any property name that could not be changed is included in an error message.
-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

prop=value...
Specifies one or more property value pairs. If the -f flag is specified, prop=value pair parameters should not be entered on the command line. prop is any defined persistent property name. Use the lsrsrcdef command to display a list of the defined persistent properties and their data types for the specified resource. The value entered must be the appropriate data type for the specified attribute. For example, if NodeNumber is defined as a uint32 data type, enter a positive numeric value.
resource_class
Specifies a resource class name. Enter the lsrsrcdef command for a list of defined resource class names.
resource_handle
Specifies a resource handle that is linked with the resource that you want to change. Use the lsrsrc command to obtain valid resource handles. The resource handle must be enclosed within double quotation marks, for example:
"0x4017 0x0001 0x00000000 0x0069684c 0x0d4715b0 0xe9635f69"

Security

The user needs write permission for the resource_class specified in chrsrc to run chrsrc. Permissions are specified in the access control list (ACL) file on the contacted system. See the RSCT Guide and Reference for information about the ACL file and how to modify it.

Exit Status

0
Command has run successfully.
1
Error occurred with RMC.
2
Error occurred with CLI script.
3
Incorrect flag on command line.
4
Incorrect parameter on command line.
5
Error occurred with RMC that was based on faulty command line input.
6
No resources were found that match the selection string.

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_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.

Standard Output

When the -h flag is specified, this command's usage statement is written to standard output. All verbose messages are written to standard output.

Standard Error

All trace messages are written to standard error.

Examples

  1. To change the Int32, Uint32 and SD persistent resource properties in resource class IBM.Foo for the resources that have a Name equal to c175n05, enter:
    chrsrc -s 'Name == "c175n05"' IBM.Foo \
    Int32=-9999 Uint32=9999\
    SD='["testing 1 2 3",1,{2,4,6}]'
  2. To change the Int32, Uint32, SD persistent resource properties in resource class IBM.Foo for the resource that has a Name starting with c175n, using the Resource_Data_Input file with the following contents:
    PersistentResourceAttributes::
    resource 1: 
         Int32  = -9999
         Uint32 = 9999
         SD     = ["testing 1 2 3",1,{2,4,6}]
    enter:
    chrsrc -f /tmp/IBM.Foo.chrsrc\
     -s 'Name ?= "c175n"'  IBM.Foo
  3. To change the Name persistent resource property for the resource that has a resource handle equal to "0x0001 0x4005 0x35ae868c 0x00000000 0xfeef2948 0x0d80b827", enter:
    chrsrc -r "0x0001 0x4005 0x35ae868c 0x00000000 0xfeef2948 0x0d80b827" Name="c175n05"
        

Location

/usr/sbin/rsct/bin/chrsrc
Contains the chrsrc command

Related Information

Commands: lsrsrc, lsrsrcdef, mkrsrc, rmrsrc

Files: rmccli

Books: see the RSCT Guide and Reference for information about RMC operations and about how to use expressions and selection strings

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]