dsmi_get_device_health
Prototype
int dsmi_get_device_health(int device_id, unsigned int *phealth)
Description
Obtains the overall health status of a device. If there are multiple alarms, the most critical alarm applies.
For the Ascend 310 AI Processor, this API supports mini modules (EP) and standard PCIe cards.
Parameters
Parameter |
Input/Output |
Description |
---|---|---|
device_id |
Input |
Device ID For the Ascend 310 AI Processor, the value range is 0–63. Obtain the actual device ID by calling dsmi_list_device. |
phealth |
Output |
Pointer to the overall health status of the device. The value indicates only the health status of the current component. The value is displayed in hexadecimal format as follows:
|
Returns
Type |
Description |
---|---|
int |
0 on success; else, failure |
Restrictions
None
Example
... int ret = 0; unsigned int health; ret = dsmi_get_device_health(0, &health); ...