refsensor Command
Purpose
Refreshes a sensor or a microsensor defined to the resource monitoring and control (RMC) subsystem.
Syntax
To refresh a sensor:
refsensor [–a | –n host1[,host2…] | –N { node_file | "–" } ] [–h ] [ –v | –V ] sensor_name
To refresh a microsensor:
refsensor –m [–a | –n host1[,host2…] | –N { node_file | "–" } ] [–h ] [ –v | –V ] sensor_name
Description
The refsensor command refreshes a sensor or microsensor resource that is defined to the RMC subsystem. Sensors and microsensors are RMC resources with attributes that can be monitored. Sensors and microsensors must be monitored for refsensor to run successfully.
A sensor can be refreshed using refsensor in one of two ways: either by running the sensor command that is defined for the sensor resource or by specifying values for specific sensor attributes. A microsensor can be refreshed using refsensor to query the values of the microsensor's load module. Use the -m flag to refresh a microsensor.
When the refsensor command runs, it does not affect the interval, if any, that is defined (using mksensor) for running the sensor command or for querying the microsensor load module . That is, if a monitored sensor or microsensor is being updated every 60 seconds, running refsensor does not cause the interval timer to be reset to 60 seconds.
The refsensor command runs on any node. If you want refsensor to run on all of the nodes in a domain, use the -a flag. If you want refsensor 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.
- Float32
- The type float32 attribute for this sensor resource
- Float64
- The type float64 attribute for this sensor resource
- Int32
- The type int32 attribute for this sensor resource
- Int64
- The type int64 attribute for this sensor resource
- Quantum
- The type quantum attribute for this sensor resource
- String
- The type string attribute for this sensor resource
- Uint32
- The type uint32 attribute for this sensor resource
- Uint64
- The type uint64 attribute for this sensor resource
refsensor Sensor1 Int32=45 Float32=7.8
Microsensor attributes cannot be updated separately.
Flags
- –a
- Refreshes 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, refsensor -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 resource to be refreshed is a microsensor resource.
- –n host1[,host2…]
- Specifies one or more nodes on which the sensor should be refreshed. By default, the sensor is refreshed on the local node. This flag is only appropriate in a management domain or a peer domain.
- –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 "–" in a management domain or a peer domain to read the node names from standard input.
- –h
- Writes the command's usage statement to standard output.
- –v | –V
- Writes the command's verbose messages to standard output.
Parameters
- sensor_name
- Specifies the name of the sensor to be refreshed.
- attr=value
- Specifies which sensor attributes will be refreshed and the values to which they will be set.
Security
To refresh sensors using this command, you need write permission for the IBM.Sensor resource class.
To refresh 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.
- 4
- The sensor is not monitored and cannot be refreshed.
- 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 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.
Implementation Specifics
This command is part of the rsct.core fileset for AIX® and rsct.core-3.1.0.0-0.platform.rpm package for Linux®, Solaris, and Windows, where platform is i386, ppc, ppc64, s390, or x86_64.
Examples
- To refresh the sensor called Sensor1 so
that its defined sensor command is run, enter:
refsensor Sensor1
- To refresh the sensor called Sensor1 so
that Int32 is set to 50, Float32
is set to 123.45, and String is
set to "test input", enter:
refsensor Sensor1 Int32=50 Float32=123.45 String="test input"
- To refresh the sensor called Sensor1 on
the nodes that are listed in the /u/joe/common_nodes file
so that Sensor1's defined sensor command
is run, enter:
where /u/joe/common_nodes contains:refsensor -N /u/joe/common_nodes Sensor1
# common node file # node1.myhost.com main node node2.myhost.com backup node
- To refresh the microsensor called IBM.Sensor1 so
that the attribute values are queried using the defined microsensor
load module, enter:
refsensor -m IBM.Sensor1
Location
- /opt/rsct/bin/refsensor