Interview Question

Interview San Antonio, TX

Add enough swap space to total 4G and make it persist

  through a reboot.
Answer

Interview Answer

1 Answer

1

created a 16GB /swapfile; [root@dworksdbtest ~]# free -g total used free shared buffers cached Mem: 31 0 30 0 0 0 -/+ buffers/cache: 0 30 Swap: 19 0 19 How to create the /swapfile? dd if=/dev/zero of=/swapfile bs=1024 count=16384000 * count = swapsize-in-MB * 1024; 16384000 = 16000 * 1024; mkswap /swapfile in /etc/fstab, added "/swapfile swap swap defaults 0 0" reboot check with 'free -g' and 'cat /proc/swaps'

jesse on Sep 8, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.