How to check Rpi4 memory available
Hello,
I have just bought a Rpi4 and unfortunately I did not check the memory chip before attaching the heat sink.
How can I check the total available memory from the GUI or from the command line?
Thanks!
Dan
I have just bought a Rpi4 and unfortunately I did not check the memory chip before attaching the heat sink.
How can I check the total available memory from the GUI or from the command line?
Thanks!
Dan
Re: How to check Rpi4 memory available
Run "cat /proc/cpuinfo" and look up the revision code on https://www.raspberrypi.org/documentati ... /README.md
If you want to see available memory counted in MB then run "free -m". The missing portion is used by the GPU.
If you want to see available memory counted in MB then run "free -m". The missing portion is used by the GPU.
Last edited by trejan on Sat Nov 30, 2019 9:21 pm, edited 1 time in total.
Re: How to check Rpi4 memory available
From command line type free.
ETA: Trejan's response is more accurate though my response is easier and will give you a good idea of how much memory is installed.
ETA: Trejan's response is more accurate though my response is easier and will give you a good idea of how much memory is installed.
E8 85 A2 40 C9 40 81 94 40 81 95 40 89 84 89 96 A3
Still NF Shirls
Still NF Shirls
-
- Posts: 15829
- Joined: Fri Mar 09, 2012 7:36 pm
- Location: Vallejo, CA (US)
Re: How to check Rpi4 memory available
Or you could look at the box it came in.
Re: How to check Rpi4 memory available
And " free -h " will give the answer in Gigs and Megs.
pi@raspberrypi:~ $ free -m
total used free shared buff/cache available
Mem: 3627 655 2050 172 922 2725
Swap: 2047 0 2047
pi@raspberrypi:~ $ free -h
total used free shared buff/cache available
Mem: 3.5Gi 654Mi 2.0Gi 170Mi 921Mi 2.7Gi
Swap: 2.0Gi 0B 2.0Gi
pi@raspberrypi:~ $
Remember, nobody is listening to you
until you fart ...
until you fart ...
-
- Posts: 15829
- Joined: Fri Mar 09, 2012 7:36 pm
- Location: Vallejo, CA (US)
Re: How to check Rpi4 memory available
FTFY.RossDv8 wrote: ↑Sun Dec 01, 2019 12:13 amAnd " free -h " will give the answer in Gigs and Megs.Code: Select all
[quote]pi@raspberrypi:~ $ free -m total used free shared buff/cache available Mem: 3627 655 2050 172 922 2725 Swap: 2047 0 2047 pi@raspberrypi:~ $ free -h total used free shared buff/cache available Mem: 3.5Gi 654Mi 2.0Gi 170Mi 921Mi 2.7Gi Swap: 2.0Gi 0B 2.0Gi pi@raspberrypi:~ $
Re: How to check Rpi4 memory available
Typing "top" into a terminal will also tell you how much ram there is, how much is in use and how much is available
55:55:44:44:4C
52:4C:52:42:41
Rose tinted glasses are difficult to see through.
52:4C:52:42:41
Rose tinted glasses are difficult to see through.
Re: How to check Rpi4 memory available
And although it looks a bit scary compared to 'free' it is the first 5 lines that are most useful at a quick glance.Typing "top" into a terminal will also tell you how much ram there is, how much is in use and how much is available
Below those lines it is great for checking individual program memory usage.
Also, unlike the others, top is updating in real time.
E D I T
I forgot to add that just as " free - h " gives a more human friendly output than " free -m "
If you type " htop " into a terminal instead of " top " you will get a much easier to read output including colour coding the lines so you can see what is going on more easily.
Not everything about the Linux Command Line is as scary as it looks for beginners

top htop
Remember, nobody is listening to you
until you fart ...
until you fart ...
Re: How to check Rpi4 memory available
I suppose I should have explained that htop is a bit more interactive than it looks.
It is similar to the System Monitor GUI program you find on all Linix distros.
If you clisk on any of the GREEN headings, it will sort on that heading. So click CPU% once and it will sort from lowest to highest, and click again and the highest CPU hogs are at teh top.
Same goes for PID USER MEM% and all the others.
Similarly, in the BLUE at the bottom,
Setup lets you change settings in htop
Search lets you find a particular program or process
Filter lets you focus on all the processes being used by a particular program (Filter on Chromium if you have it running)
Esc takes you OUT of any of those Blue items
Which is Very Handy if you accidentally clicked on Kill !!! Which can create HAVOC if you don't know what you are doing.
Googling htop is interesting.
I start htop with one click on an icon on a Panel ( just too lazy to open a Terminal to type the 4 letters) because I prefer it to other montors.
It is similar to the System Monitor GUI program you find on all Linix distros.
If you clisk on any of the GREEN headings, it will sort on that heading. So click CPU% once and it will sort from lowest to highest, and click again and the highest CPU hogs are at teh top.
Same goes for PID USER MEM% and all the others.
Similarly, in the BLUE at the bottom,
Setup lets you change settings in htop
Search lets you find a particular program or process
Filter lets you focus on all the processes being used by a particular program (Filter on Chromium if you have it running)
Esc takes you OUT of any of those Blue items
Which is Very Handy if you accidentally clicked on Kill !!! Which can create HAVOC if you don't know what you are doing.
Googling htop is interesting.
I start htop with one click on an icon on a Panel ( just too lazy to open a Terminal to type the 4 letters) because I prefer it to other montors.
Remember, nobody is listening to you
until you fart ...
until you fart ...
Re: How to check Rpi4 memory available
Also try:
Code: Select all
cat /proc/meminfo
Re: How to check Rpi4 memory available
Code: Select all
pi@raspberrypi:~ $ inxi -m | grep total
RAM: total: 3.89 GiB used: 443.6 MiB (11.1%) gpu: 124.0 MiB
Code: Select all
pi@raspberrypi:~ $ sudo apt-get install inxi
Code: Select all
pi@raspberrypi:~ $ df -m | grep ramdisk
tmpfs 128 6 123 5% /mnt/ramdisk
Šalica malina.
Re: How to check Rpi4 memory available
I bought an 8GB but at
What does this mean? Did I get the wrong one?
Code: Select all
free -m // Mem 3727
free -h // Mem 3.6Gi
htop // Mem 3.64G
Re: How to check Rpi4 memory available
Because you run a 32 bit OS perhaps?
http://duinorasp.hansotten.com for Raspberry Pi and Arduino and ESP8266
http://retro.hansotten.nl for retrocomputing with 8 bit CPU's
http://retro.hansotten.nl for retrocomputing with 8 bit CPU's
-
- Posts: 643
- Joined: Thu Jul 04, 2019 10:21 am
- Location: UK, Birmingham
Re: How to check Rpi4 memory available
Flash the 64bit OS; try again.Wobbo wrote: ↑Fri Jul 10, 2020 10:31 amI bought an 8GB but at
What does this mean? Did I get the wrong one?Code: Select all
free -m // Mem 3727 free -h // Mem 3.6Gi htop // Mem 3.64G
[NEW] Ubuntu - CM4/RPi4B custom image(s)! XFCE4, LXQt, i3-WM, WireGuard, Samba, Kodi, Latest MESA graphics drivers!
Code: Select all
https://www.raspberrypi.org/forums/viewtopic.php?f=131&t=314419
Re: How to check Rpi4 memory available
The 32-bit RPiOS should still see there is 8GB, the limitation is that only 4GB can be addressed by a process (3GB user accessible when you take in to account that the upper 1GB of the address space is reserved for the kernel). I haven't an 8GB to check if free really can't report more than 4GB.
There is a difference in the power circuitry (between the USB-C port and the HDMI port), can't find an image on here of it but there is one about halfway down this article with the difference highlighted. RPi4-8GB
She who travels light — forgot something.
Please note that my name doesn't start with the @ character so can people please stop writing it as if it does!
Please note that my name doesn't start with the @ character so can people please stop writing it as if it does!
Re: How to check Rpi4 memory available
It could also be correct. Linux OS will naturally eat tons of RAM for buffers/cache. It will release these as real programs need the space. This is normal and expected.Paeryn wrote: ↑Fri Jul 10, 2020 2:42 pmThe 32-bit RPiOS should still see there is 8GB, the limitation is that only 4GB can be addressed by a process (3GB user accessible when you take in to account that the upper 1GB of the address space is reserved for the kernel). I haven't an 8GB to check if free really can't report more than 4GB.
Re: How to check Rpi4 memory available
Hackswell wrote: ↑Fri Jul 10, 2020 6:05 pmIt could also be correct. Linux OS will naturally eat tons of RAM for buffers/cache. It will release these as real programs need the space. This is normal and expected.Paeryn wrote: ↑Fri Jul 10, 2020 2:42 pmThe 32-bit RPiOS should still see there is 8GB, the limitation is that only 4GB can be addressed by a process (3GB user accessible when you take in to account that the upper 1GB of the address space is reserved for the kernel). I haven't an 8GB to check if free really can't report more than 4GB.
I thought the question was about which model of RPi4 [ 1 | 2 | 4 | 8 ] the hardware was? Surely independent of what OS is running, if any...
Re: How to check Rpi4 memory available
It should look like this:Wobbo wrote: ↑Fri Jul 10, 2020 10:31 amI bought an 8GB but at
What does this mean? Did I get the wrong one?Code: Select all
free -m // Mem 3727 free -h // Mem 3.6Gi htop // Mem 3.64G
Code: Select all
pi@raspberrypi:~ $ free -m
total used free shared buff/cache available
Mem: 7866 50 7643 13 172 7696
Swap: 0 0 0
pi@raspberrypi:~ $ free -h
total used free shared buff/cache available
Mem: 7.7Gi 50Mi 7.5Gi 13Mi 172Mi 7.5Gi
Swap: 0B 0B 0B
pi@raspberrypi:~ $ cat /proc/meminfo
MemTotal: 8054900 kB
MemFree: 7826532 kB
MemAvailable: 7881032 kB
Buffers: 15500 kB
Cached: 145536 kB
SwapCached: 0 kB
Active: 138400 kB
Inactive: 40736 kB
Active(anon): 20776 kB
Inactive(anon): 11136 kB
Active(file): 117624 kB
Inactive(file): 29600 kB
Unevictable: 16 kB
Mlocked: 16 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 18176 kB
Mapped: 20536 kB
Shmem: 13816 kB
KReclaimable: 15472 kB
Slab: 30544 kB
SReclaimable: 15472 kB
SUnreclaim: 15072 kB
KernelStack: 1616 kB
PageTables: 832 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 4027448 kB
Committed_AS: 94204 kB
VmallocTotal: 262930368 kB
VmallocUsed: 4312 kB
VmallocChunk: 0 kB
Percpu: 640 kB
CmaTotal: 65536 kB
CmaFree: 64244 kB
pi@raspberrypi:~ $
Re: How to check Rpi4 memory available
4B 8GB running RPiOS32:
It has nothing to do with 64 bit OS.... As stated the only memory oddness with 32 bit OS is the limitation of 3Gb / process.
Code: Select all
bj@devnull:~ $ free -m
total used free shared buff/cache available
Mem: 7724 2781 3224 382 1718 4294
Swap: 2047 0 2047
bj@devnull:~ $ free -h
total used free shared buff/cache available
Mem: 7.5Gi 2.8Gi 3.0Gi 419Mi 1.7Gi 4.0Gi
Swap: 2.0Gi 0B 2.0Gi
htop shows 7.54G for Mem
Re: How to check Rpi4 memory available
Hi guys.
The thing with a 32 bit OS is that it can only address 32bit of memory.
8 bit is 256
16 is 65536
24 is 16777216
32 is 4294967296 or 4096MB if you divide by (1024*1024).
So that is basically why you need a 64bit OS to address more memory than 4GB which can address a lot more memory, more than any normal person would fit into a machine.
[ 256^8 ]
So even if you have this fine 64 bit CPU a 32bit OS will limit the memory you can address.
The thing with a 32 bit OS is that it can only address 32bit of memory.
8 bit is 256
16 is 65536
24 is 16777216
32 is 4294967296 or 4096MB if you divide by (1024*1024).
So that is basically why you need a 64bit OS to address more memory than 4GB which can address a lot more memory, more than any normal person would fit into a machine.

[ 256^8 ]
So even if you have this fine 64 bit CPU a 32bit OS will limit the memory you can address.