### CArclib::ArcGetHWMon

The ArcGetHWMon method returns the information about a H/W monitor.

virtual ARC_STATUS ArcGetHWMon ( DWORD HwItem, pHwMonInfo pHwInfo );

#### Parameters:

[IN]

HwItem: Hardware monitor item.

Value | Meaning
HWMON_FAN_INFO | Get H/W information about fans.
HWMON_VOL_INFO | Get H/W information about voltages
HWMON_TMP_INFO | Get H/W information about temperatures
HWMON_PWR_INFO | Get H/W information about powers
HWMON_UPS_INFO | Get H/W information about UPS
HWMON_BATTERY_INFO | Get H/W information about Battery

[OUT]

pHwInfo: Pointer to a sHwMonInfo structure that receives the information.

#### Return Values

This method returns the ARC_STATUS.

#### Note:

This method is suitable for RAID subsystem excluding ARC-5010 & ARC-6010

These two models should use the other method ArcGetHWMon5010.

For HWMON_TMP_INFO:

In normal circumstances the number of temperatures would equal to the maximum supported HDDs,

it means the returned temperatures are all for HDDs,

but in some controllers support the CPU & Controller temperatures reporting,

the first two positions are reserved for these two items.

#### Examples:

ARC_STATUS Exe_Hw_Info_Cmd(CArclib &ctrl) { ARC_STATUS stat; sHwMonInfo voltageInfo, fanInfo, hddTempInfo, batteryInfo; int i; int addTemp; // get H/W monitor information about fans stat = ctrl.ArcGetHWMon(HWMON_FAN_INFO, &fanInfo); if (stat != ARC_SUCCESS) { return stat; } // get H/W monitor information about temperatures stat = ctrl.ArcGetHWMon(HWMON_TMP_INFO, &hddTempInfo); if (stat != ARC_SUCCESS) { return stat; } // get H/W monitor information about voltages stat = ctrl.ArcGetHWMon(HWMON_VOL_INFO, &voltageInfo); if (stat != ARC_SUCCESS) { return stat; } // get H/W monitor information about battery backup module stat = ctrl.ArcGetHWMon(HWMON_BATTERY_INFO, &batteryInfo); if(stat != ARC_SUCCESS) { return stat; } printf("The Hardware Monitor Information\n"); printf("===========================================\n"); // show voltage status for (i = 0; i < voltageInfo.HwItemCount; i+=2) { printf("Power +%-5.2lfV : %2.3lf\n", (double)voltageInfo.ItemInfo[i]/(double)1000.0, (double)voltageInfo.ItemInfo[i+1]/(double)1000.0); } // show fan status for (i = 0; i < fanInfo.HwItemCount; i++) { if (fanInfo.ItemInfo[i] == 0xffff) { printf("Fan#%d Speed (RPM) : N.A.\n", i+1); } else { printf("Fan#%d Speed (RPM) : %d\n", i+1, fanInfo.ItemInfo[i]); } } // show battery status for ( i = 0; i < batteryInfo.HwItemCount; i++) { if(batteryInfo.ItemInfo[i] == BBM_NOT_INSTALLED /* 255 */) { printf("Battery Status : Not Installed\n"); } else if(batteryInfo.ItemInfo[i] == BBM_FAILED /* 254 */) { printf("Battery Status : Failed\n"); } else { printf("Battery Status : %d%%\n", batteryInfo.ItemInfo[i]); } } // show temperatures addTemp = 0; i = 0; if(hddTempInfo.HwItemCount != sysInfo.gsiIdeChannels) { printf("CPU Temp. : %d\n", hddTempInfo.ItemInfo[0]); printf("Controller Temp. : %d\n", hddTempInfo.ItemInfo[1]); addTemp = 2; } for (i = addTemp; i < hddTempInfo.HwItemCount; i++) { printf("HDD #%-2d Temp. : %d\n", i - addTemp, hddTempInfo.ItemInfo[i]); } printf("===========================================\n"); return ARC_SUCCESS; }