Skip to main content

add more SWAP files in CentOS 7






to enable swapfiles in CentOS 7

#fallocate -l (size_of_swap) (destination file)

example to add 8GB of Swap:
#fallocate -l 8gb /swapfile

this will create 8GB in directory / filename swapfile

change its mod with
#chmod 600 /swapfile

then run
#mkswap /swapfile

then run
#swapon /swapfile

you can edit /etc/fstab and add this line:
/swapfile none defaults 0 0

to check if it active:
#free

or
#swapon -s

or
#systemctl -a | grep swap



Comments

Popular posts from this blog

Mount ISO image file on HP-UX

There are 2 ways to mount iso file in hp-ux 1) using LVM method (to copy ISO into a logical volume) is the same as for older HP-UX releases: 1. Find out the size of the ISO image: # du -k /data/myImage.iso NOTE: The size will be in Kb. 2. Create a logical volume for the ISO image: # lvcreate -L -n iso /dev/vg00 NOTE: The name of the logical volume will be /dev/vg00/iso 3. Copy the ISO file to the raw logical volume: # dd if=/data/myImage.iso of=/dev/vg00/riso bs=64k 4. Create a temporary directory and mount the /dev/vg00/iso volume # mkdir /iso_image # mount /dev/vg00/iso /iso_image NOTE: For HP-UX 11.11 you must install the latest CDFS patches: PHCO_25841 Add Rock Ridge extension to mount_cdfs(1M) PHKL_26269 Rock Ridge extension for ISO-9660 PHKL_34153 CDFS cumulative patch 2) Available in HP-UX 11.31 0909: ISOIMAGE-ENH. Provides a new DLKM module fspd. Required to mount, read and umount the ISO image file. The comm...

Darkstat - Nework Traffic Analyzer atau Monitor Jaringan

Darkstat - Nework Traffic Analyzer atau Monitor Jaringan Apa itu Darkstat? Darkstat adalah pengumpul statistik jaringan. Secara efektif, ini adalah paket sniffer yang berjalan sebagai proses latar belakang pada Kabel / DSL router, mengumpulkan segala macam statistik berguna tapi menarik, Dan melayani mereka melalui HTTP. Fitur Darkstat Grafik lalu lintas Melacak lalu lintas per host. Melacak lalu lintas per port TCP dan UDP untuk setiap host. Embedded web-server dengan deflate compression. Asynchronous reverse DNS resolution menggunakan proses child. Kecil. Portable. Single-threaded. Efisien. Instalasi Darkstat di Ubuntu ~$ sudo Apt-get install darkstat Ini akan menyelesaikan instalasi. Setelah Anda menyelesaikan instalasi, Anda perlu mengedit file yang terletak di /etc/darkstat/init.cfg START_DARKSTAT = no menjadi START_DARKSTAT = iya Start darkstat  # / Etc / init.d / darkstat start Ini akan memulai proses darkstat Arahkan browser Anda di ht...

Mengakses iLO dari ESX CLI

untuk melakukan perubahan pada konfigurasi iLO, kita bisa menggunakan web Interface yang tersedia, tapi, jika hal ini tidak memungkinkan ada alternatif mengubah konfigurasi ini melalui ESX CLI (command line interface). tools yang akan dipakai berupa script dengan file bernama hponcfg pertama tama kita harus mempunyai akses SSH terhadap ESX yang dimana iLO nya akan kita ubah. 1. lakukan koneksi SSH dan login dengan user root  kedalam ESX mesin. lalu masuk ke dalam direktori /opt/tools 2. untuk melihat help dari perintah hponcfg  kita dapat menjalankan perintah: #./hponcfg -h   3. untuk mengambil informasi server: #./hponcfg -g     4. untuk melakukan perubahan pada konfigurasi iLO kita harus mengexport konfigurasi ini kedalam suatu file, dan file ini akan kita edit lalu setelah pengeditan pada file konfigurasi selesai, file ini akan kita upload ke dalam iLO dan iLO akan kita reset (restart). untuk mengexport konfigurasi iLO: #./hponcfg -w /tmp/hp-ilo.txt  gu...