Monitoring Sensors

Getting Started with Napatech Link-Storage™ Software

Platform
Napatech IPU
Content Type
Getting Started
Capture Software Version
Link-Storage™ Software 1.0

The bmcsensors tool is used to manage and monitor sensor data for boards and pluggable modules on the IPU.

Sensor management with bmcsensors

mctp-demux-daemon is required for running the bmcsensors tool. See Retrieving IPU Information.

bmcsensors provides functionality to list, read, and configure sensor thresholds. Refer to the following command examples.

To navigate to the tool directory:
soc# cd /opt/ipu_tools/bin
where soc# indicates the SoC on the IPU where provided commands are to be to executed.
To identify sensor IDs (which are product specific), list all available sensors as follows.
soc# ./bmcsensors -l
An output example:
=== PDR Repository ==============
  pldm_pdr_get_record_count : 29
     pldm_pdr_get_repo_size : 2448
        recordHandle : 0x0
    nextRecordHandle : 0x13
=== PDR Record ==============
…
…
=== PDR Record ==============
  Sensor Auxiliary Names PDR:
  PLDMTerminusHandle : 0x1234
            sensorId : 24
         sensorCount : 1
     nameStringCount : 1
     nameLanguageTag : en
          sensorName : "SoC Inlet Air Temperature"
        recordHandle : 0x4d
    nextRecordHandle : 0x64
…
…
Look for entries for the target sensor. For example, this output shows that the sensor ID of the SoC inlet air temperature is 24.
Note: Sensor IDs are product specific.

Once you know the sensor ID, for example, 24 for the SoC inlet air temperature, read the sensor data running the command as follows.

soc# ./bmcsensors -r 24
This returns current reading, operational state and other sensor parameters.
An output example:
Reading sensor ID 24 information example:
soc# ./bmcsensors -r 24
=== Get Sensor Reading ==============
                 sensorDataSize : 0x05 (SINT32)
         sensorOperationalState : 0x00 (enabled)
       sensorEventMessageEnable : 0x00 (noEventGeneration)
                   presentState : 0x01 (Normal)
                  previousState : 0x08 (UpperWarning)
                     eventState : 0x01 (Normal)
              retpresentReading : 0x29
              retpresentReading : 20.5 Degrees C < Per None> (+1.0/-1.0 tolerance, ± 0.00 % accuracy)
To read sensor thresholds, use the -t option as shown in the following command example.
soc# bmcsensors -t 24
An output example:
=== Get Sensor Thresholds ==============
                             rc : 0
              retcompletionCode : 0x0
       retupperThresholdWarning : 0x7d
       retupperThresholdWarning : 125
      retupperThresholdCritical : 0x0
      retupperThresholdCritical : 0
         retupperThresholdFatal : 0xfa
         retupperThresholdFatal : 250
       retlowerThresholdWarning : 0x0
       retlowerThresholdWarning : 0
      retlowerThresholdCritical : 0x0
      retlowerThresholdCritical : 0
         retlowerThresholdFatal : 0x0
         retlowerThresholdFatal : 0
             retsensor_dataSize : 0x5 (SINT32)
To set sensor thresholds, use the following format:
./bmcsensors -T "sensorId uw uc uf lw lc lf"
where:
  • uw: Upper warning
  • uc: Upper critical
  • uf: Upper fatal
  • lw: Lower warning
  • lc: Lower critical
  • lf: Lower fatal
For example, to set thresholds of the SoC inlet air temperature:
soc# bmcsensors -T "24 100 0 250 0 0 0"
id = 24
uw = 100
uc = 0
uf = 250
lw = 0
lc = 0
lf = 0
=== Set Sensor Thresholds ==============
              retcompletionCode : 0x0
To view all available command-line options:
soc# ./bmcsensors -h
command options:
-h | --help
-v | --verbose
-e | --eid=<int>    : Set endpoint id (default 0)
-i | --info         : Show PDR repository info
-s | --single=<int> : List specific PDR record (quick)
-l | --list=<int>   : List specific PDR record (slow)
-l | --list         : List all PDR records available
-r | --getm=<int>   : Get sensor reading (manual re-arm)
-R | --geta=<int>   : Get sensor reading (auto re-arm)
-t | --gett=<int>   : Get sensor thresholds
-T | --sett="<sensor id> <upperThresholdWarning> <upperThresholdCritical> <upperThresholdFatal> <lowerThresholdWarning> <lowerThresholdCritical> <lowerThresholdFatal>" : Set sensor thresholds
-S | --show=<int>   : Show sensor list for 1 specific sensor-id or all
-x | --nothresholds : Do not include thresholds when using the show option
-p | --precision    : Full precision output for sensor readings
This lists options for verbose output, sensor info, listing individual or all sensors, and more.