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

Commands Reference, Volume 4

rmrsrc Command


Removes a defined resource.


rmrsrc -s "selection_string [-a] [-h] [-TV] resource_class

rmrsrc -r resource_handle [-a] [-h] [-TV]


The rmrsrc command removes, or "undefines" the specified resource instance or resource instances. The rmrsrc command makes a request to resource monitoring and control (RMC) to undefine a specific resource instance. The resource manager of the resource removes the resource.

The first format of this command requires a resource class name parameter and a selection string specified using the -s flag. All resources in the specified resource class that match the specified selection string are removed. If the selection string identifies more than one resource to be removed, it is the same as running this command once for each resource that matches the selection string.

The second format of this command allows the actual resource handle linked with a specific resource to be specified as the parameter. It is expected that this form of the command would be more likely used from within a script.


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, rmrsrc -a with CT_MANAGEMENT_SCOPE not set will apply to the management domain. In this case, 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 using the format: "0xnnnn 0xnnnn 0xnnnnnnnn 0xnnnnnnnn 0xnnnnnnnn 0xnnnnnnnn", where n is any valid hexadecimal digit. The resource handle uniquely identifies a particular resource instance that should be removed.
-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.

Writes the command's usage statement to standard output.
Writes the command's trace messages to standard error. For your software service organization's use only.
Writes the command's verbose messages to standard output.


Specifies the resource class name. The resource instances for this resource class that match the selection string criteria are removed.


The user needs write permission for the resource_class specified in rmrsrc to run rmrsrc. 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

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

Environment Variables

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.
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:
Specifies local scope.
Specifies local scope.
Specifies peer domain scope.
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.

The command output and all verbose messages are written to standard output.

Standard Error

All trace messages are written to standard error.


  1. To remove the resource with the Name c175n05 from resource class IBM.Host, enter:
    rmrsrc -s 'Name == "c175n05"' IBM.Host 
  2. To remove the resource linked with resource handle: "0x4017 0x0001 0x00000000 0x0069684c 0x0d52332b3 0xf3f54b45", enter:
    rmrsrc -r "0x4017 0x0001 0x00000000 0x0069684c 0x0d52332b3 0xf3f54b45"


Contains the rmrsrc command

Related Information

Commands: lsrsrc, mkrsrc

Files: rmccli

Books: see the RSCT Guide and Reference for information about RMC operations

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