Checked with Zabbixw32.exe version v1.1-b4 in sysinfo.cpp.
Refers to items disktotal, diskfree, diskusage:
If there is a typo in cmd, it seems the agent will return the "disktotal" value instead of SYSINFO_RC_NOTSUPPORTED.
Refers to items disktotal, diskfree, diskusage:
If there is a typo in cmd, it seems the agent will return the "disktotal" value instead of SYSINFO_RC_NOTSUPPORTED.
Code:
static LONG H_DiskInfo(char *cmd,char *arg,double *value)
{
char path[MAX_PATH];
ULARGE_INTEGER freeBytes,totalBytes;
GetParameterInstance(cmd,path,MAX_PATH-1);
if (!GetDiskFreeSpaceEx(path,&freeBytes,&totalBytes,NULL))
return SYSINFO_RC_NOTSUPPORTED;
if (!memcmp(cmd,"diskfree[",9))
*value=(double)((__int64)freeBytes.QuadPart);
else if (!memcmp(cmd,"diskused[",9))
*value=(double)((__int64)totalBytes.QuadPart-(__int64)freeBytes.QuadPart);
else
*value=(double)((__int64)totalBytes.QuadPart);
return SYSINFO_RC_SUCCESS;
}