New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 Bugs at CPU and RAM #386

Closed
LucyDemooon opened this Issue Sep 23, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@LucyDemooon
Copy link

LucyDemooon commented Sep 23, 2016

hey

have found 2 BUGS at the CPU frequency and Ram.
Ram is 1GB to high.
and CPU frequency is incorrect
see pic http://www.directupload.net/file/d/4487/vq9o55ar_png.htm

@tobbez

This comment has been minimized.

Copy link

tobbez commented Sep 23, 2016

The RAM is correct. 1GiB is 1024MiB:32117/1024 = 31.364 ≈ 31.4

@LucyDemooon

This comment has been minimized.

Copy link

LucyDemooon commented Sep 23, 2016

I do not mean the maximum value
but the current value

@tobbez

This comment has been minimized.

Copy link

tobbez commented Sep 23, 2016

No idea where the system monitor you use as reference gets its data. Anyway...

If one wants to calculate it the way it's currently done then rather than

usedmem = MemTotal - MemFree - Buffers - Cached

it looks like it should be:

usedmem = MemTotal + Shmem - MemFree - Buffers - Cached - SReclaimable

Shmem covers e.g. tmpfs, which is included in cache, but is not actually reclaimable.

SReclaimable is reclaimable part of Slab.

Optionally SwapCached can be subtracted as well - it's memory that was swapped out, is swapped in again, but is still also left in the swap. Essentially it can be swapped out "for free". Doesn't seem quite right to include though (and doesn't seem to be in other tools).

On kernels 3.14 and later, the MemAvailable value could possibly be used (commit).

Here's some related links:

@darealshinji darealshinji added the bug label Nov 12, 2016

jmmweismiller added a commit to jmmweismiller/tmux-mem-cpu-load that referenced this issue Jan 18, 2018

Updated used memory calculation.
Changed used memory calculation to account for shared memory in accordance with this:
KittyKatt/screenFetch#386 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment