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

Commands Reference, Volume 4


rmrsrc Command

Purpose

Removes a defined resource.

Syntax

rmrsrc [-h] -s "Selection_string" [-T] [-V] Resource_class

rmrsrc [-h] -r [-T] [-V] Resource_handle

Description

The rmrsrc command removes (undefines) the specified resource instance or resource instances. The rmrsrc command makes a request to 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.

Parameters

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

Resource_handle
A resource handle. The resource handle must be specified using the format: "0x#### 0x#### 0x######## 0x######## 0x######## 0x########", where # is any valid hexadecimal digit. The resource handle uniquely identifies a particular resource instance that should be removed.

Flags

-h
Writes the command's usage statement to standard output.

-r
Specifies that a resource handle is supplied as the parameter

-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 "Using Expressions" in the chapter "Using the Monitoring Application" of the RSCT 2.2 Resource Monitoring and Control Guide and Reference.

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

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.

Security

This command requires root authority.

Examples

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

Files


/usr/sbin/rsct/bin/rmrsrc Location of the rmrsrc command.

Realted Information

The lsrsrc, mkrsrc commands.

The rmccli General Information file

The RSCT 2.2 Resource Monitoring and Control Guide and Reference contains more information regarding RMC operations.


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