Posts

Showing posts with the label swap

How to add more swap space by adding new swap partition in RHEL or CentOS 7 ?

How to add more swap space by adding new swap partition in RHEL or CentOS 7 What is swap? Swap space on a disk is used when the amount of physical RAM is full in the Linux system. When the system runs out of RAM, inactive pages are moved from the RAM to the swap space. Swap space can be either a dedicated swap partition or a swap file. So here we will see how you can add more swap space as a swap file. In this article we will see how we can add more swap space using a new swap partition. Steps : Let's check how much swap is available on the system currently: [root@localhost ~]# swapon --show [root@localhost ~]# free -h I have a new 10GB disk named "/dev/sdb" and i want to use it as a swap space. [root@localhost ~]# fdisk -l Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Step 1 : Create a...

Monitoring Memory, CPU and swap on RHEL or CentOS 7

Image
top : The top provides a dynamic real-time view of running processes, CPU, Memory and SWAP utilization on a system. It can display system summary information as well as a list of processes or threads currently being managed by the Linux kernel. [root@localhost ~]# top In case as a root you want to check it for some particular user then : [root@localhost ~]# top -u hpe pmap : This command report memory map of a process or processes. [root@localhost ~]# pmap -d 22745 vmstat : This command reports information about processes, memory, paging, block IO, traps, disks and cpu activity. [root@localhost ~]# vmstat -w [root@localhost ~]# vmstat -as [root@localhost ~]# vmstat -dw [root@localhost ~]# vmstat -D             5 disks             2 partitions         48470 total reads           104 merged reads     ...