# Sensor Set Subcommand

access: Managers

Allows you to set some of the data associated with a specific sensor or a class of sensors.

> sensor set [{-i | --id} SENSOR_ID [{-i | --id} SENSOR_ID] …]
> {[{-C | --crithigh} VALUE] [[{-c | --critlow} VALUE]
> [{-W | --warnhigh] VALUE] [{-w | --warnlow} VALUE] [{-v | --value} {on|off}] |
> {-r | --reset}}

> sensor set [{-t | --type] TYPE_ID]
> {[{-C | --crithigh} VALUE] [[{-c | --critlow} VALUE]
> [{-W | --warnhigh] VALUE] [{-w | --warnlow} VALUE] [{-v | --value} {on|off}] |
> {-r | --reset}}

> sensor set [{-R | --resetall}]

Argument | Description
--- | ---
`{-i | --id}` | Specifies the specific sensor on which to operate. Multiple sensors may be specified by repeating --id.
{-t | --type} | Specifies the specific sensor class on which to operate (for example, fan, voltage, etc.).
{-C | --crithigh} | Specifies the critical high threshold value for the sensor. Setting the string to clear disables the threshold. Setting the string to reset sets the value to the original factory specified value. If the value specified ends in a percent sign (%), the theshold is set to that percent of the nominal value for the sensor. Any other value is interpreted as the actual value to which to set the threshold.
{-c | --critlow} | Specifies the critical low threshold value for the sensor. Setting the string to clear disables the threshold.
{-W | --warnhigh} | Specifies the warning high threshold value for the sensor. Setting the string to clear disables the threshold.
{-w | --warnlow} | Specifies the warning low threshold value for the sensor. Setting the string to clear disables the threshold.
{-v | --value} | Sets the value of the sensor.
{-r | --reset} | Specifies to reset all thresholds for the indicated sensor(s) to the factory defaults.
{-r | --reset} | Specifies to reset all thresholds for the indicated sensor(s) to the factory defaults.
{-R | --resetall} | Specifies to reset all thresholds for all sensors to the factory defaults.

Return Codes

Following are the return values for this command:

Return Code | Numeric Code | Description
--- | --- | ---
NWSE_Success | 0 | Command successfully completed.
NWSE_InvalidUsage | 1 | Invalid usage: bad parameter usage, conflicting options specified.
NWSE_RPCTimeout | 2 | Request was issued, but was not serviced by the server. RPC procedure timed out and the request may or may not have been serviced by the server.
NWSE_RPCNotConnected | 3 | Unable to connect to the RPC server.
NWSE_InvalidArgument | 4 | One or more arguments were incorrect or invalid.
NWSE_NotFound | 5 | Entity (user, service, file, path, etc.) was not found.
NWSE_NoPermission | 6 | Not authorized to perform this operation.

Notes

- There are some sensors who's value either does not change, are there to provide information in the event of a problem, or facilitate the proper operation of the software. Many of these sensors do not have a related component (parent) associated with them (for example, a CPU's die temperature sensor has the CPU as its parent component, and a fan speed sensor has the fan as its parent component, but the product-id sensor only reports a static value and has no parent relationship). This relationship establishes which component(s) are affected by changes in the sensor's value. You cannot modify the thresholds for sensors without a parent relationship since an event will never occur for these threshold crossings.

Related Topics

System Management Commands

Sensor Command