Check Available Memory Slots Linux

Checking free memory slots left hi, I was just wondering is there any way one can check how many memory slots are unused in a HP server running HP UX 11i (rp5xxx,7xxx,8xxx and SD) without going all throught those calculations 'I have that much memory, my system can support up to that much memory - it means that I can add that much more memory'.

Check Available Memory Slots Linux
  • Memory: 6156316k/7012352k available (4648k kernel code, 63836k reserved, 2402k data, 424k init, 5307208k highmem) The first part of the output is the value that you are looking for. The memory info is usually printed out in kB or kilo bytes.
  • If you need memory totals, you can add the t option like so: free -mt. This will simply total the amount of memory in columns (Figure 5). Figure 5: Having free total your memory columns for you. Another very handy tool to have at your disposal is vmstat. This particular command is a one-trick pony that reports virtual memory statistics.
P: n/a
Alessandro Monopoli wrote:
Hi all,
I'm searching a PORTABLE way to get the available and total physical memory.
Something like 'getTotalMemory' and it returns the memory installed on my PC
in bytes, and
'getAvailableMemory' and it returns the available memory in bytes.
Do you know is there's a C function, a c++ Object or anything else that
compiles in Linux and Windows to get these data?

The POSIX symbols _SC_PHYS_PAGES and _SC_PAGE_SIZE could be what you are
looking for, at least for UNIX-like operating systems:
long phypz = sysconf(_SC_PHYS_PAGES);
long psize = sysconf(_SC_PAGE_SIZE);
Of course, you need to calculate _total_ physical memory by hand then.
Unfortunately I don't know a portable solution to obtain the _available_
physical memory the same easy way.
Windows does not support all of these symbols, so you will need to call
something like GlobalMemoryStatus() which fills a MEMORYSTATUS
structure, that itself contains a member dwTotalPhys containing the
_total_ physical memory for this system and dwAvailPhys indicating the
_available_ physical memory.
Suggestions and better solutions are welcome. Please let us know what
others would recommend.
Steve
--
Steve Graegert {C/C++ && Java && .NET}
CSI Technology Group (StReG)
<graegerts(AT)cs(DOT)technologies(DOT)de>
If you need a quick way to find out how much RAM your Linux system supports or to determine the number of DIMM slots available, you can use a command line tool called 'dmidecode'.

To find out the maximum RAM capacity and the number of RAM slots available, use the following command:
Check Available Memory Slots LinuxCheck available memory slots linux upgradeLinux
The output should look something like this:
The 'Maximum Capacity' is the maximum RAM supported by your system, while 'Number of Devices' is the number of memory (DIMM) slots available on your computer.

To see complete memory information, including the info above along with currently installed memory information (RAM speed, size, etc.), use:

Here's an example output for the command above:
You can also use lshw (among others) for this (firstly, install it; in Ubuntu: 'sudo apt-get install lshw):

It's important to note that Dmidecode reports system hardware information as described in the BIOS and does not scan your hardware, so in some cases the output can be wrong. Running dmidecode on my Dell XPS L702X non-3D laptop, the output says my system should have 4 RAM slots but in fact there are only 2 and only the 3D version of my laptop can have 4 RAM slots (and by the way, there are some Windows applications reporting the same thing), however, the command is accurate about it supporting 16 GB of RAM.

Check Available Memory Slots Linux Mint

Linux

Check Available Memory Slots Linux Usb

Also see: How To Get Hardware Information In Linux
Comments are closed.