Displays information about sensors and microsensors that are defined to the resource monitoring and control (RMC) subsystem.
lssensor [-m] [ -a | -n host1[,host2…] | -N { node_file "–" } ] [ -l | -t | -d | -D delimiter ] [-x] [-h] [ -v | -V ] [ -A | sensor_name1 [ sensor_name2…] ]
The lssensor command displays the attributes of one or more sensors. If you do not specify any name parameters, 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. Use the -m flag to display information about microsensors.
The lssensor command displays values for attributes that you can set using a sensor command or a microsensor module, if the attributes are monitored. If the attributes are not monitored, lssensor does not display their values. A sensor command is a command or script that the sensor resource manager runs to set and update a sensor's attribute values. A microsensor module is a loadable module that the microsensor resource manager runs to set and update a microsensor's attribute values.
Use the -l, -t, -d, or -D flags to display the output in long format, table format, or delimiter format. The -x flag omits headings when any of these flags are used.
The lssensor command runs on any node. If you want lssensor to run on all of the nodes in a domain, use the -a flag. If you want lssensor 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.
Field | Description |
---|---|
Name | The name of the sensor. |
Command | The command that is run to update the sensor attributes |
ConfigChanged | Information about changes to access or to persistent attributes |
ControlFlags | Indicates whether any special handling is required for this sensor |
Description | This field is not used |
ErrorExitValue | Indicates how the exit value is interpreted by the sensor resource manager |
ErrorMessage | This field is not used |
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 |
MonitorStatus | This attribute is set to 1 when certain sensor attributes are being monitored |
NodeNameList | The name of the node where the sensor resource is defined |
RefreshInterval | The interval (in seconds) during which the sensor attribute values are updated when the sensor command is run |
SavedData | An output string from the sensor command |
SD | Contains all dynamic resource attributes except ConfigChanged, Quantum, and ExitValue as its elements |
String | The type string attribute for this sensor resource |
TimeCommandRun | Indicates the date and time that the sensor command was run |
Uint32 | The type uint32 attribute for this sensor resource |
Uint64 | The type uint64 attribute for this sensor resource |
UserName | The user ID that is used when run the sensor command is run |
Field | Description |
---|---|
Name | The name of the microsensor. |
ActivePeerDomain | The peer domain for which information is being displayed. |
Arguments | The arguments for this microsensor resource. |
ConfigChanged | Information about changes to persistent attributes or to access. |
CustomDynamicAttributes | The custom dynamic attributes for this microsensor resource. |
Description | Information about the microsensor and what it monitors. |
Float32 | The type float32 attribute for this microsensor resource. |
Float32Array | The type float32 array attribute for this microsensor resource. |
Float64 | The type float64 attribute for this microsensor resource. |
Float64Array | The type float64 array attribute for this microsensor resource. |
Int32 | The type int32 attribute for this microsensor resource. |
Int32Array | The type int32 array attribute for this microsensor resource. |
Int64 | The type int64 attribute for this microsensor resource. |
Int64Array | The type int64 array attribute for this microsensor resource. |
LastQueryRC | The return code from the microsensor module from the last time the microsensor was called for an attribute of the microsensor resource. |
LastQueryTime | The time of LastQueryRC. |
ModuleName | The path name to the loadable microsensor module. |
MonitorStatus | This attribute is set to 1 when any of the other microsensor attributes is being monitored. |
NodeNameList | The name of the node where this microsensor is defined. |
RefreshInterval | The interval (in seconds) during which the microsensor attribute values are updated when the microsensor callback is called. |
String | The type string attribute for this microsensor resource. |
StringArray | The type string array attribute for this microsensor resource. |
UInt32 | The type uint32 attribute for this microsensor resource. |
UInt32Array | The type uint32 array attribute for this microsensor resource. |
UInt64 | The type uint64 attribute for this microsensor resource. |
UInt64Array | The type uint64 array attribute for this microsensor resource. |
To display sensor information using this command, you need read permission for the IBM®.Sensor resource class. To display microsensor information using this command, you need read permission for the IBM.MicroSensor resource class. Permissions are specified in the access control list (ACL) file on the contacted system. See the Administering RSCT guide for details on the ACL file and how to modify it.
This command is part of the Reliable Scalable Cluster Technology (RSCT) fileset for AIX®.
lssensor
The
output will look like this: sensor1
sensor2
sensor3
lssensor -A
The
output will look like this: Name = sensor1
ActivePeerDomain =
Command = /usr/local/bin/sensorcmd1
ConfigChanged = 0
ControlFlags = 1
Description =
ErrorExitValue = 1
ExitValue = 0
Float32 = 1.06381e+06
Float64 = 1.06381e+06
Int32 = 1063814
Int64 = 1063814
NodeNameList = {somenode.pok.ibm.com}
RefreshInterval = 60
SavedData = Last SavedData
SD = [string from sensor1,1063814,1063814,1063814,1063814,1.06381e+06,1.06381e+06]
String = string from sensor1
Uint32 = 1063814
Uint64 = 1063814
UserName = root
-------------------
Name = CFMRootModTime
ActivePeerDomain =
Command = /opt/csm/csmbin/mtime/cfmroot
ConfigChanged = 0
ControlFlags = 0
Description =
ErrorExitValue = 1
ExitValue = 0
Float32 = 0
Float64 = 0
Int32 = 0
Int64 = 0
NodeNameList = {somenode.pok.ibm.com}
RefreshInterval = 60
SavedData =
SD = [,0,0,0,0,0,0]
String =
Uint32 = 0
Uint64 = 0
UserName = root
-------------------
Name = ErrorLogSensor
ActivePeerDomain =
Command = /opt/csm/csmbin/monerrorlog
ConfigChanged = 0
ControlFlags = 0
Description =
ErrorExitValue = 1
ExitValue = 0
Float32 = 0
Float64 = 0
Int32 = 0
Int64 = 0
NodeNameList = {somenode.pok.ibm.com}
RefreshInterval = 60
SavedData =
SD = [,0,0,0,0,0,0]
String =
Uint32 = 0
Uint64 = 0
UserName = root
-------------------
.
.
.
lssensor sensor2
The output will look like
this: Name = sensor2
Command = /usr/local/bin/sensorcmd2
ConfigChanged = 0
ControlFlags = 0
Description =
ErrorExitValue = 1
ExitValue = 127
Float32 = 0
Float64 = 0
Int32 = 0
Int64 = 0
NodeNameList = {somenode.pok.ibm.com}
RefreshInterval = 60
SavedData =
SD = [,0,0,0,0,0,0]
String =
Uint32 = 0
Uint64 = 0
UserName = root
lssensor -dA
The output will look like
this: Displaying sensor information:
Name:ActivePeerDomain:Command:ConfigChanged:ControlFlags:Description:ErrorExitValue:ErrorMessage:ExitValue:
Float32:Float64:Int32:Int64:MonitorStatus:NodeNameList:RefreshInterval:SD:SavedData:
String:TimeCommandRun:Uint32:Uint64:UserName:
JoeExample:JoeDomain:cat /etc/motd:0:0::1::0:
::::0:{node1.myhost.com}:60:[,0,0,0,0,0,0]::
:Fri Feb 6 19:00:00 2009:::root:
JoeSample:JoeDomain:/usr/sbin/rsct/install/bin/ctversion:0:0::1::0:
::::0:{node1.myhost.com}:60:[,0,0,0,0,0,0]::
:Fri Feb 6 19:00:00 2009:::root:
JoeSens:JoeDomain:/tmp/sensor/numusers:0:1::1::0:
::::0:{node1.myhost.com}:0:[,2,0,0,0,0,0]::
:Tue Mar 3 10:27:19 2009:::root:
lssensor -N /u/joe/common_nodes
where
/u/joe/common_nodes contains:# common node file
#
node1.myhost.com main node
node2.myhost.com backup node
The output will look
like this:sensor1
sensor2
sensor3
lssensor -m
The
output will look like this:IBM.MSensor1
IBM.MSensor2
IBM.MSensor3
lssensor -m IBM.MSensor2
The
output will look like this:Name = IBM.MSensor2
ActivePeerDomain =
Arguments = all
ConfigChanged = 0
CustomDynamicAttributes = {[CDA1,19,1,3,0,1],[CDA2,20,2,2,0,1],[CDA3,21,3,2,0,1]
Description =
Float32 =
Float32Array =
Float64 =
Float64Array =
Int32 = 52
Int32Array = {36, 45, 2, 73}
Int64 =
Int64Array =
LastQueryRC = 0
LastQueryTime = Tue Mar 31 18:00:00 2009
ModuleName = /usr/slib/msensors/sensor2
MonitorStatus = 0
NodeNameList = {node2.gumby.com}
RefreshInterval = 600
String =
StringArray =
UInt32 =
UInt32Array =
UInt64 =
UInt64Array =