rmsensor Command

Purpose

Removes a sensor or a microsensor from the resource monitoring and control (RMC) subsystem.

Syntax

rmsensor [ -m ] [-a | -n host1[,host2…] | -N { node_file | "-" } ] [-h] [-v-V] sensor_name1 [sensor_name2…]

Description

The rmsensor command removes one or more sensors from the IBM®.Sensor resource class or one or more microsensors from the IBM.MicroSensor resource class in the RMC subsystem. Use the -m flag to remove a microsensor.

If the sensor or microsensor is being monitored, monitoring will be stopped, but the event response resource manager (ERRM) resources defined for monitoring are not removed. To remove the ERRM resources, use the rmcondition, rmresponse, or rmcondresp command against the monitoring resources that were used for this sensor or microsensor.

The rmsensor command runs on any node. If you want rmsensor to run on all of the nodes in a domain, use the -a flag. If you want rmsensor to run on a subset of nodes in a domain, use the -n flag. Instead of specifying multiple node names using the -n flag, 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.

If Cluster Systems Management (CSM) is installed on your system, you can use CSM defined node groups as node name values to refer to more than one node. For information about working with CSM node groups and using the CSM nodegrp command, see the CSM: Administration Guide and the CSM: Command and Technical Reference.

Flags

-a
Removes sensors that match the specified name on all nodes in the domain. The CT_MANAGEMENT_SCOPE environment variable determines the cluster scope. If CT_MANAGEMENT_SCOPE 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 domain and a peer domain exist, rmsensor -a with CT_MANAGEMENT_SCOPE not set will run in the management domain. In this case, to run in the peer domain, set CT_MANAGEMENT_SCOPE to 2.
-m
Specifies that the resources to be removed are microsensor resources.
-h
Writes the command's usage statement to standard output.
-n host1[,host2…]
Specifies the node from which the sensor should be removed. By default, the sensor is removed from the local node. This flag is only appropriate in a management domain or a peer domain.
-N {node_file | "-"}
Specifies a file or standard input listing the nodes on which the sensor must be removed. This flag is only appropriate in a Cluster Systems Management (CSM) or a peer domain cluster.
-v │ -V
Writes the command's verbose messages to standard output.

Parameters

sensor_name1 [sensor_name2…]
Specifies one or more names of sensors to remove.

Security

To remove sensors using this command, you need write permission for the IBM.Sensor resource class. To remove microsensors using this command, you need write permission for the IBM.MicroSensor resource class. Permissions are specified in the access control list (ACL) file on the contacted system. See the RSCT: Administration Guide for details on the ACL file and how to modify it.

Exit Status

0
The command has run successfully.
1
An incorrect combination of flags and parameters has been entered.
6
No sensor resources were found.
n
Based on other errors that can be returned by the RMC subsystem.

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 this 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 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 rsct.core fileset for AIX®.

Examples

  1. To remove the sensor sensor1, enter:
    rmsensor sensor1
  2. To remove the sensor called sensor1 from the nodes that are listed in the /u/joe/common_nodes file, enter:
    rmsensor -N /u/joe/common_nodes sensor1
    where /u/joe/common_nodes contains:
    # common node file
    #
    node1.myhost.com    main node
    node2.myhost.com    backup node
  3. To remove the microsensor called IBM.usensor1, enter:
    rmsensor -m IBM.usensor1

Location

/opt/rsct/bin/rmsensor