// Copyright (c) 2018, Intel Corporation.
// SPDX-License-Identifier: BSD-3-Clause

ifdef::manpage[]
ipmctl-change-sensor(1)
=======================
endif::manpage[]

NAME
----
ipmctl-change-sensor - Changes the threshold or enabled state for PMem modules sensors

SYNOPSIS
--------
[listing]
ipmctl set [OPTIONS] -sensor (SENSORS) [TARGETS]
AlarmThreshold=(temperature) AlarmEnabled=(0|1)

DESCRIPTION
-----------
Changes the alarm threshold or enabled state for one or more PMem modules sensors.
Use the command Show Sensor to view the current settings.

OPTIONS
-------
-f::
-force::
  Changing the sensor settings is a potentially destructive operation which
  requires confirmation from the user for each PMem module. This option suppresses the
  confirmation.

-h::
-help::
    Displays help for the command.

-ddrt::
  Used to specify DDRT as the desired transport protocol for the current invocation of ipmctl.

-smbus::
  Used to specify SMBUS as the desired transport protocol for the current invocation of ipmctl.

NOTE: The -ddrt and -smbus options are mutually exclusive and may not be used together.

ifdef::os_build[]
-o (text|nvmxml)::
-output (text|nvmxml)::
  Changes the output format. One of: "text" (default) or "nvmxml".
endif::os_build[]

SENSORS
-------
MediaTemperature::
  The PMem module media temperature in Celsius.

ControllerTemperature::
  The PMem module controller temperature in Celsius.

PercentageRemaining::
  Remaining PMem module’s life as a percentage value of factory expected
  life span.

TARGETS
-------
-dimm [DimmIDs]::
  Update specified sensors on specific PMem modules by optionally supplying the PMem module
  target and one or more comma-separated PMem module identifiers. The default is to
  update the specified sensors for all manageable PMem modules.

PROPERTIES
----------
AlarmThreshold::
  The threshold value at which an alarm for the respective sensor will be triggered.
  The upper (for temperatures) or lower (for percentage remaining) alarm
  threshold of the sensor. Temperatures may be specified to a precision of 1 degree Celsius.
+
.Allowed AlarmThreshold
|===
|Sensor |Allowed AlarmThreshold values |Units

|MediaTemperature
|0-2047
|Celsius

|ControllerTemperature
|0-2047
|Celsius

|PercentageRemaining
|1-99
|%
|===

AlarmEnabled::
  Enable or disable the alarm threshold, where applicable.
  One of:
  - "0": Disable
  - "1": Enable

EXAMPLES
--------
Changes the media temperature alarm threshold to 51C on the specified PMem module and enables
the alarm.

[listing]
ipmctl set -sensor MediaTemperature –dimm 0x0001 AlarmThreshold=51 AlarmEnabled=1

LIMITATIONS
-----------
In order to successfully execute this command:

- The caller must have the appropriate privileges.

- The specified PMem modules must be manageable by the host software.

RETURN DATA
-----------
For each PMem module, the CLI will indicate the status of the operation. If a failure occurs
when modifying multiple PMem modules, the process will exit and not continue modifying the
remaining PMem modules.

SAMPLE OUTPUT
-------------
[listing]
Modify (Sensor) settings on DIMM (DimmID): Success

[listing]
Modify (Sensor) settings on DIMM (DimmID): Error (Code) -
(Description)
