• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Hot-add and Remove Logical Memory in CentOS/RHEL 7

By admin

This post explains how to use memory hotplug to increase/decrease the amount of memory.

To see (online/offline) state of memory section, read ‘state’ file.

# grep line /sys/devices/system/memory/*/state
/sys/devices/system/memory/memory0/state:online
/sys/devices/system/memory/memory1/state:online
/sys/devices/system/memory/memory2/state:online
/sys/devices/system/memory/memory3/state:online
/sys/devices/system/memory/memory4/state:online

To set a memory[x] to online/offline:

# echo online > /sys/devices/system/memory/memory[number]/state
# echo offline > /sys/devices/system/memory/memory[number]/state

To verify the current state:

# free -m

More details could be found at : /usr/share/doc/kernel-doc-*/Documentation/memory-hotplug.txt

Filed Under: CentOS/RHEL, CentOS/RHEL 7

Some more articles you might also be interested in …

  1. RHEL 7 – RHCSA Notes : Create, delete, and modify local user accounts
  2. How to persistently set nr_requests using UDEV rules
  3. How to Restrict su Access to a User Only by PAM in Linux
  4. Downloading RPM Packages with dependencies [ yumdownloader Vs yum-downloadonly Vs repoquery]
  5. CentOS / RHEL 7 : How to password protect GRUB2 menu entries
  6. “Connection reset by peer” – error while ssh into a CentOS/RHEL system with a specific user only
  7. How to enable IPv6 on CentOS / RHEL 7
  8. How to disable firewalld and and switch to iptables in CentOS / RHEL 7
  9. Why Does “netstat” Output Show Many Connections in CLOSE_WAIT Status?
  10. How to find which specific ethernet device corresponds to a specific port on a multi-interface network card in CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • How to disable ACPI in CentOS/RHEL 7
  • How to Use real-time query to access data on a physical standby database
  • CentOS/RHEL 8: “ACPI MEMORY OR I/O RESET_REG” Server Hung after reboot
  • How to Create a Physical Standby Database by Using SQL and RMAN Commands
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary