Added new PhysicalDisk.* parameters
authorVictor Kirhenshtein <victor@netxms.org>
Fri, 25 Feb 2005 14:28:53 +0000 (14:28 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Fri, 25 Feb 2005 14:28:53 +0000 (14:28 +0000)
ChangeLog
src/agent/core/getparam.cpp
src/agent/core/hddinfo.cpp

index 3f8e7b7..ab43c43 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,8 +2,11 @@
 * 0.1.15
 *
 
+- Fixed server crash at forced poll time
 - Fixed critical bug in upgrade script starter under UNIX
 - Added support of HDD temperature monitoring under Windows and Linux
+- Added PhysicalDisk.Model, PhysicalDisk.SerialNumber and
+  PhysicalDisk.Firmware parameters under Windows
 
 
 *
index d0ea3d4..45a95d7 100644 (file)
@@ -156,8 +156,9 @@ static NETXMS_SUBAGENT_PARAM m_stdParams[] =
    { "Net.Interface.PacketsOut(*)", H_NetInterfaceStats, (char *)NET_IF_PACKETS_OUT, DCI_DT_UINT, "Number of output packets on interface {instance}" },
    { "Net.Interface.Speed(*)", H_NetInterfaceStats, (char *)NET_IF_SPEED, DCI_DT_UINT, "Speed of interface {instance}" },
    { "Net.IP.Forwarding", H_NetIPStats, (char *)NET_IP_FORWARDING, DCI_DT_INT, "IP forwarding status" },
+   { "PhysicalDisk.Firmware(*)", H_PhysicalDiskInfo, "F", DCI_DT_STRING, "Firmware version of hard disk {instance}" },
    { "PhysicalDisk.Model(*)", H_PhysicalDiskInfo, "M", DCI_DT_STRING, "Model of hard disk {instance}" },
-   { "PhysicalDisk.SerialNumber(*)", H_PhysicalDiskInfo, "S", DCI_DT_STRING, "Serial number of hard disk {instance}" },
+   { "PhysicalDisk.SerialNumber(*)", H_PhysicalDiskInfo, "N", DCI_DT_STRING, "Serial number of hard disk {instance}" },
    { "PhysicalDisk.SmartAttr(*)", H_PhysicalDiskInfo, "A", DCI_DT_STRING, "" },
    { "PhysicalDisk.SmartStatus(*)", H_PhysicalDiskInfo, "S", DCI_DT_INT, "Status of hard disk {instance} reported by SMART" },
    { "PhysicalDisk.Temperature(*)", H_PhysicalDiskInfo, "T", DCI_DT_INT, "Temperature of hard disk {instance}" },
index 96cee39..e0c7536 100644 (file)
@@ -117,6 +117,7 @@ LONG H_PhysicalDiskInfo(char *pszParam, char *pszArg, char *pValue)
             break;
          case 'M':   // Model
          case 'N':   // Serial number
+         case 'F':   // Firmware
             rq.irDriveRegs.bCommandReg = ATA_IDENTIFY_DEVICE;
                 rq.irDriveRegs.bCylHighReg = 0;
             rq.irDriveRegs.bCylLowReg = 0;
@@ -203,6 +204,12 @@ LONG H_PhysicalDiskInfo(char *pszParam, char *pszArg, char *pValue)
                StrStrip(pValue);
                nRet = SYSINFO_RC_SUCCESS;
                break;
+            case 'F':   // Firmware
+               memcpy(pValue, ((ATA_IDENTIFY_DEVICE_DATA *)pResult->bBuffer)->fw_rev, 8);
+               pValue[8] = 0;
+               StrStrip(pValue);
+               nRet = SYSINFO_RC_SUCCESS;
+               break;
             default:
                nRet = SYSINFO_RC_UNSUPPORTED;
                break;