0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-29 07:00:01 +00:00

fix win sysinfo installed ram calculation ()

This commit is contained in:
Ilya Mashchenko 2024-09-04 19:26:45 +03:00 committed by GitHub
parent c2f0e75dc4
commit d7cf671bed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -108,10 +108,11 @@ static void netdata_windows_get_mem(struct rrdhost_system_info *systemInfo)
{ {
ULONGLONG size; ULONGLONG size;
char memSize[256]; char memSize[256];
// The amount of physically installed RAM, in kilobytes.
if (!GetPhysicallyInstalledSystemMemory(&size)) if (!GetPhysicallyInstalledSystemMemory(&size))
size = 0; size = 0;
else else
(void)snprintf(memSize, 255, "%llu", size); (void)snprintf(memSize, 255, "%llu", size * 1024); // to bytes
(void)rrdhost_set_system_info_variable(systemInfo, (void)rrdhost_set_system_info_variable(systemInfo,
"NETDATA_SYSTEM_TOTAL_RAM", "NETDATA_SYSTEM_TOTAL_RAM",