You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First I would like to say treefetch is an excellent fetch program, but it has an issue with the displayed memory usage and total memory.
I did a little research on htop to see how they are calculating it. I have actually done this my self in the Pascal language by using the /proc/meminfo, assuming you are familiar with the /proc/meminfo fields.
Total physical memory = MemTotal
Memory Used = (MemTotal + Shmem) - MemFree - Buffers - Cached - SReclaimable
these as you know are in kb, its just a matter of
Total phsical memory / (1024 * 1024)
Memory Used / (1024 * 1024)
or instead of using (1024*1024) just divide by the sum which is 1048576, this will yeild GB format as you already know.
Anyway I just thought to show you the calculation used by htop and btop ect... to get used memory, as your current implementation is is not adding up to the more common program memory usage programs out there.
The text was updated successfully, but these errors were encountered:
First I would like to say treefetch is an excellent fetch program, but it has an issue with the displayed memory usage and total memory.
I did a little research on htop to see how they are calculating it. I have actually done this my self in the Pascal language by using the /proc/meminfo, assuming you are familiar with the /proc/meminfo fields.
Total physical memory = MemTotal
Memory Used = (MemTotal + Shmem) - MemFree - Buffers - Cached - SReclaimable
these as you know are in kb, its just a matter of
or instead of using (1024*1024) just divide by the sum which is 1048576, this will yeild GB format as you already know.
Anyway I just thought to show you the calculation used by htop and btop ect... to get used memory, as your current implementation is is not adding up to the more common program memory usage programs out there.
The text was updated successfully, but these errors were encountered: