Skip to content
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
Closed

2 Bugs at CPU and RAM #386

LucyDemooon opened this issue Sep 23, 2016 · 3 comments
Labels

Comments

@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
Copy link

tobbez commented Sep 23, 2016

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

@LucyDemooon
Copy link
Author

I do not mean the maximum value
but the current value

@tobbez
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:

jmmweismiller added a commit to jmmweismiller/tmux-mem-cpu-load that referenced this issue Jan 18, 2018
Changed used memory calculation to account for shared memory in accordance with this:
KittyKatt/screenFetch#386 (comment)
HorlogeSkynet pushed a commit to HorlogeSkynet/archey4 that referenced this issue Mar 26, 2020
Details :
* Used RAM value : <KittyKatt/screenFetch#386 (comment)>
* RAM unit : We were also computing Mebibytes, not Megabytes (see upcoming `feature/btrfs` changes for `Disk` entry).
dev-hann added a commit to dev-hann/tmux-mem-cpu-load that referenced this issue Sep 18, 2023
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
Labels
Projects
None yet
Development

No branches or pull requests

3 participants