monitoring memory - panel vs dp values

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
7 posts • Page 1 of 1
tpjctrl
Posts: 141
Joined: Tue May 08, 2018 10:30 am

monitoring memory - panel vs dp values

Post by tpjctrl »

Does anyone know why the Memory Monitoring panel shows values different to what is in the corresponding dps? for example:


_MemoryCheck.AvailKB: 23287896 vs 22789MB (monitor panel)
_MemoryCheck.AvailPerc: 81 vs 80.93% (monitor panel)
_MemoryCheck.EmergencyKBLimit: 262144 vs 256MB (monitor panel)
_MemoryCheck.FreeKB: 23287896 vs ? (same as available?)
_MemoryCheck.FreePerc: 81 vs ? (same as available?)
_MemoryCheck.TotalKB: 28834828 vs 28159MB (monitor panel)
_MemoryCheck.UsedKB: 5546932 vs 5370MB (monitor panel)

The percentages are fine, but raw values in KB vs MB shown on the panel are roughly 10% off. I'm putting together a summary panel for all distributed systems connected to a master system and I wanted to know which values are correct and whether I should be using some sort of correction parameter for the raw dp values?

Thanks,
Tom


tpjctrl
Posts: 141
Joined: Tue May 08, 2018 10:30 am

Re: monitoring memory - panel vs dp values

Post by tpjctrl »

Thanks, I simply assumed it's MBs, not MiBs.

tpjctrl
Posts: 141
Joined: Tue May 08, 2018 10:30 am

Re: monitoring memory - panel vs dp values

Post by tpjctrl »

Further to the above, it seems that the KB marked dpes like FreeKB, TotalKB etc. are actually KiB, as for most dps the /1024 calculation actually gives results closer to what is shown on the monitor panel, but there's still discrepancies:

_MemoryCheck.AvailKB: 23287896KiB vs 22789MiB (monitor panel) - wrong as 23287896 / 1024 gives 22742(MiB)
_MemoryCheck.EmergencyKBLimit: 262144 vs 256MB (monitor panel) - this is spot on when dividing by 1024
_MemoryCheck.TotalKB: 28834828 vs 28159MB (monitor panel) - this is also spot on when dividing by 1024
_MemoryCheck.UsedKB: 5546932 vs 5370MB (monitor panel) - wrong as 5546932 / 1024 gives 5417(MiB)

Any ideas why?

dbindernagel
Posts: 151
Joined: Mon Feb 23, 2015 1:34 pm

Re: monitoring memory - panel vs dp values

Post by dbindernagel »

Yes the shown values are all the "xBinaryBytes" versions as is common usage (so actually KiB, MiB, GiB instead of KB, MB, GB).

You can look at what the code actually does yourself and it simply divides the values by 1024 if I have not overlooked something (the value on the tooltip is calculated differently, though).

The panel name is "vision\DeviceVirtual.png"
(I checked on version 3.18 P014. It could be different depending on your version.)

Since the value changes quite often could it be you copied one value after it has already changed?

tpjctrl
Posts: 141
Joined: Tue May 08, 2018 10:30 am

Re: monitoring memory - panel vs dp values

Post by tpjctrl »

Thanks, well I'll just stick to dividing by 1024 and blame the difference on something else :) I did take a screenshot of both the PARA and the monitoring panel side by side, so in theory changes should be registered on both at the same time.

User avatar
leoknipp
Posts: 2846
Joined: Tue Aug 24, 2010 7:28 pm

Re: monitoring memory - panel vs dp values

Post by leoknipp »

We cannot see the screenshots you have taken.
I had a look at the source code and it looks like the value derived from the operating system is given in bytes. The value is divided by 1024 in the code before it is written to the DP elements which are named "KB".
The naming of the DP elements seems to be correct.

Best Regards
Leopold Knipp
Senior Support Specialist

Post Reply
7 posts • Page 1 of 1