mirror of
https://github.com/netdata/netdata.git
synced 2025-04-29 07:00:01 +00:00
fix win sysinfo installed ram calculation (#18482)
This commit is contained in:
parent
c2f0e75dc4
commit
d7cf671bed
1 changed files with 2 additions and 1 deletions
|
@ -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",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue