Physical State Queries

Physical State Queries#

ROCmSMI: Physical State Queries
Physical State Queries

Functions

rsmi_status_t rsmi_dev_fan_rpms_get (uint32_t dv_ind, uint32_t sensor_ind, int64_t *speed)
 Get the fan speed in RPMs of the device with the specified device index and 0-based sensor index. More...
 
rsmi_status_t rsmi_dev_fan_speed_get (uint32_t dv_ind, uint32_t sensor_ind, int64_t *speed)
 Get the fan speed for the specified device as a value relative to RSMI_MAX_FAN_SPEED. More...
 
rsmi_status_t rsmi_dev_fan_speed_max_get (uint32_t dv_ind, uint32_t sensor_ind, uint64_t *max_speed)
 Get the max. fan speed of the device with provided device index. More...
 
rsmi_status_t rsmi_dev_temp_metric_get (uint32_t dv_ind, uint32_t sensor_type, rsmi_temperature_metric_t metric, int64_t *temperature)
 Get the temperature metric value for the specified metric, from the specified temperature sensor on the specified device. More...
 
rsmi_status_t rsmi_dev_volt_metric_get (uint32_t dv_ind, rsmi_voltage_type_t sensor_type, rsmi_voltage_metric_t metric, int64_t *voltage)
 Get the voltage metric value for the specified metric, from the specified voltage sensor on the specified device. More...
 

Detailed Description

These functions provide information about the physical characteristics of the device.

Function Documentation

◆ rsmi_dev_fan_rpms_get()

rsmi_status_t rsmi_dev_fan_rpms_get ( uint32_t  dv_ind,
uint32_t  sensor_ind,
int64_t *  speed 
)

Get the fan speed in RPMs of the device with the specified device index and 0-based sensor index.

Given a device index dv_ind and a pointer to a uint32_t speed, this function will write the current fan speed in RPMs to the uint32_t pointed to by speed

Parameters
[in]dv_inda device index
[in]sensor_inda 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0.
[in,out]speeda pointer to uint32_t to which the speed will be written If this parameter is nullptr, this function will return RSMI_STATUS_INVALID_ARGS if the function is supported with the provided, arguments and RSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function with the given arguments
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid

◆ rsmi_dev_fan_speed_get()

rsmi_status_t rsmi_dev_fan_speed_get ( uint32_t  dv_ind,
uint32_t  sensor_ind,
int64_t *  speed 
)

Get the fan speed for the specified device as a value relative to RSMI_MAX_FAN_SPEED.

Given a device index dv_ind and a pointer to a uint32_t speed, this function will write the current fan speed (a value between 0 and the maximum fan speed, RSMI_MAX_FAN_SPEED) to the uint32_t pointed to by speed

Parameters
[in]dv_inda device index
[in]sensor_inda 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0.
[in,out]speeda pointer to uint32_t to which the speed will be written If this parameter is nullptr, this function will return RSMI_STATUS_INVALID_ARGS if the function is supported with the provided, arguments and RSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function with the given arguments
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid

◆ rsmi_dev_fan_speed_max_get()

rsmi_status_t rsmi_dev_fan_speed_max_get ( uint32_t  dv_ind,
uint32_t  sensor_ind,
uint64_t *  max_speed 
)

Get the max. fan speed of the device with provided device index.

Given a device index dv_ind and a pointer to a uint32_t max_speed, this function will write the maximum fan speed possible to the uint32_t pointed to by max_speed

Parameters
[in]dv_inda device index
[in]sensor_inda 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0.
[in,out]max_speeda pointer to uint32_t to which the maximum speed will be written If this parameter is nullptr, this function will return RSMI_STATUS_INVALID_ARGS if the function is supported with the provided, arguments and RSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function with the given arguments
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid

◆ rsmi_dev_temp_metric_get()

rsmi_status_t rsmi_dev_temp_metric_get ( uint32_t  dv_ind,
uint32_t  sensor_type,
rsmi_temperature_metric_t  metric,
int64_t *  temperature 
)

Get the temperature metric value for the specified metric, from the specified temperature sensor on the specified device.

Given a device index dv_ind, a sensor type sensor_type, a rsmi_temperature_metric_t metric and a pointer to an int64_t temperature, this function will write the value of the metric indicated by metric and sensor_type to the memory location temperature.

Parameters
[in]dv_inda device index
[in]sensor_typepart of device from which temperature should be obtained. This should come from the enum rsmi_temperature_type_t
[in]metricenum indicated which temperature value should be retrieved
[in,out]temperaturea pointer to int64_t to which the temperature will be written, in millidegrees Celcius. If this parameter is nullptr, this function will return RSMI_STATUS_INVALID_ARGS if the function is supported with the provided, arguments and RSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function with the given arguments
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid

◆ rsmi_dev_volt_metric_get()

rsmi_status_t rsmi_dev_volt_metric_get ( uint32_t  dv_ind,
rsmi_voltage_type_t  sensor_type,
rsmi_voltage_metric_t  metric,
int64_t *  voltage 
)

Get the voltage metric value for the specified metric, from the specified voltage sensor on the specified device.

Given a device index dv_ind, a sensor type sensor_type, a rsmi_voltage_metric_t metric and a pointer to an int64_t voltage, this function will write the value of the metric indicated by metric and sensor_type to the memory location voltage.

Parameters
[in]dv_inda device index
[in]sensor_typepart of device from which voltage should be obtained. This should come from the enum rsmi_voltage_type_t
[in]metricenum indicated which voltage value should be retrieved
[in,out]voltagea pointer to int64_t to which the voltage will be written, in millivolts. If this parameter is nullptr, this function will return RSMI_STATUS_INVALID_ARGS if the function is supported with the provided, arguments and RSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function with the given arguments
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid