Я для этого уже давно написал и использую такой патчик:
Code Select
--- netxms-1.2.10/src/agent/subagents/linux/linux.cpp 2013-11-15 18:04:23.000000000 +0400
+++ netxms-1.2.10-r1/src/agent/subagents/linux/linux.cpp 2014-01-09 17:51:00.000000000 +0400
@@ -180,9 +180,9 @@
{ _T("Net.Interface.AdminStatus(*)"), H_NetIfInfoFromIOCTL, (TCHAR *)IF_INFO_ADMIN_STATUS,
DCI_DT_INT, DCIDESC_NET_INTERFACE_ADMINSTATUS },
{ _T("Net.Interface.BytesIn(*)"), H_NetIfInfoFromProc, (TCHAR *)IF_INFO_BYTES_IN,
- DCI_DT_UINT, DCIDESC_NET_INTERFACE_BYTESIN },
+ DCI_DT_UINT64, DCIDESC_NET_INTERFACE_BYTESIN },
{ _T("Net.Interface.BytesOut(*)"), H_NetIfInfoFromProc, (TCHAR *)IF_INFO_BYTES_OUT,
- DCI_DT_UINT, DCIDESC_NET_INTERFACE_BYTESOUT },
+ DCI_DT_UINT64, DCIDESC_NET_INTERFACE_BYTESOUT },
{ _T("Net.Interface.Description(*)"), H_NetIfInfoFromIOCTL, (TCHAR *)IF_INFO_DESCRIPTION,
DCI_DT_STRING, DCIDESC_NET_INTERFACE_DESCRIPTION },
{ _T("Net.Interface.InErrors(*)"), H_NetIfInfoFromProc, (TCHAR *)IF_INFO_IN_ERRORS,
diff -ur netxms-1.2.10/src/agent/subagents/linux/net.cpp netxms-1.2.10-r1/src/agent/subagents/linux/net.cpp
--- netxms-1.2.10/src/agent/subagents/linux/net.cpp 2013-11-29 17:56:24.000000000 +0400
+++ netxms-1.2.10-r1/src/agent/subagents/linux/net.cpp 2014-01-09 17:53:39.000000000 +0400
@@ -526,15 +526,15 @@
int i;
char *eptr, szBuffer[256];
const char *pszWord;
- DWORD dwValue;
+ QWORD qwValue;
LONG nRet = SYSINFO_RC_ERROR;
for(i = 0, pszWord = pszLine; i <= nPos; i++)
pszWord = ExtractWordA(pszWord, szBuffer);
- dwValue = strtoul(szBuffer, &eptr, 0);
+ qwValue = (QWORD) strtoull(szBuffer, &eptr, 0);
if (*eptr == 0)
{
- ret_uint(pValue, dwValue);
+ ret_uint64(pValue, qwValue);
nRet = SYSINFO_RC_SUCCESS;
}
return nRet;