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

Commands Reference, Volume 3, i - m

lssensor Command

Purpose

Displays the sensors that are defined to the resource monitoring and control (RMC) subsystem.

Syntax

lssensor [-a | -n host1[,host2...]] [-h] [-v | -V] [-A | name1 [name2...]]

Description

The lssensor command displays the attributes of the sensor identified by name. If name is omitted, the lssensor command lists the names of all of the sensors. Use the -A flag to list all of the sensors and all of their attributes and values.

Using lssensor name or lssensor -A causes the sensor command to run. The sensor command is the command or script that is defined to set the sensor attribute values. It is specified using the mksensor command.

The lssensor command runs on any node. If you want lssensor to run on all of the nodes in a domain, use the the -a flag. If you want lssensor to run on a subset of nodes in a domain, use the the -n flag.

The lssensor command lists the following information about defined sensors:

Field
Description
Name
The name of the sensor
Command
The command to run that updates the sensor attributes
ConfigChanged
Information about persistent attribute or access changes
Description
This field is not used
ErrorExitValue
Indicates how the exit value is interpreted by the sensor resource manager
ExitValue
The exit code from the command that is running
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
Uint32
The type uint32 attribute for this sensor resource
Uint64
The type uint64 attribute for this sensor resource
String
The type string attribute for this sensor resource
NodeNameList
The name of the node where the sensor resource is defined
RefreshInterval
The interval in seconds in which the sensor attribute values are updated by running the sensor command
UserName
The user ID to use when running the sensor command

A sensor is an RMC resource with attributes that can be monitored. The values of the attributes are set by the sensor resource manager that updates the values at defined intervals using commands or scripts as designated by the mksensor command. The sensor values can also be updated using the refsensor command.

Flags

-a
Lists 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, lssensor -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.
-A
Displays all of the sensors with their attributes and values.
-n host1[,host2...]
Specifies the node from which the sensor should be listed. By default, the sensor is listed from the local node. This flag is only appropriate in a management domain or a peer domain.
-h
Writes the command's usage statement to standard output.
-v | -V
Writes the command's verbose messages to standard output.

Parameters

name1 [name2...]
Specifies the names of one or more sensors to display.

Security

The user needs read permission for the IBM.Sensor resource class in order to run lssensor. Permissions are specified in the access control list (ACL) file on the contacted system.

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

Examples

  1. To list the names of all of the sensors, enter:
    lssensor
    The output will look like this:
    sensor1
    sensor2
    sensor3
  2. To list the names and attributes of all sensors, enter:
    lssensor -A
    The output will look like this:
    Name = sensor1
    Command = /usr/local/bin/sensorcmd1
    ConfigChanged = 0
    Description =
    ErrorExitValue = 1
    ExitValue = 127
    Float32 = 0
    Float64 = 0
    Int32 = 0
    Int64 = 0
    NodeNameList = {somenode.pok.ibm.com}
    RefreshInterval = 60
    String =
    Uint32 = 0
    Uint64 = 0
    UserName = root
    -------------------
    Name = sensor2
    Command = /usr/local/bin/sensorcmd2
    ConfigChanged = 0
    Description =
    ErrorExitValue = 1
    ExitValue = 127
    Float32 = 0
    Float64 = 0
    Int32 = 0
    Int64 = 0
    NodeNameList = {somenode.pok.ibm.com}
    RefreshInterval = 60
    String =
    Uint32 = 0
    Uint64 = 0
    UserName = root
    -------------------
    .
    .
    .
  3. To list the names and attributes of all sensors, enter:
    lssensor sensor2
    The output will look like this:
    Name = sensor2
    Command = /usr/local/bin/sensorcmd2
    ConfigChanged = 0
    Description =
    ErrorExitValue = 1
    ExitValue = 127
    Float32 = 0
    Float64 = 0
    Int32 = 0
    Int64 = 0
    NodeNameList = {somenode.pok.ibm.com}
    RefreshInterval = 60
    String =
    Uint32 = 0
    Uint64 = 0
    UserName = root

Location

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

Related Information

Commands: chsensor, mksensor, refsensor, rmsensor

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