Posts

Showing posts from 2017

Enable Firewalld Rules on Kickstart

To enable firewall rules on kickstart file we need to use the following command FIREWALL-OFFLINE-C(1)                                                                                     firewall-offline-cmd                                                                                    FIREWALL-OFFLINE-C(1) NAME        firewall-offline-cmd - firewalld offline command line client SYNOPSIS        firewall-offline-cmd [OPTIONS...] DESCRIPTION        firewall-offline-cmd is an offline command line client of the firewalld daemon. It should be used only if the firewalld service is not running. For example to migrate from system-config-firewall/lokkit or in the install        environment to configure firewall settings with kickstart.        Some lokkit options can not be automatically converted for firewalld, they will result in an error or warning message. This tool tries to convert as much as possible, but there are limitations for example with custom rules,        modules and masquera

How do you empty you swap memory on Redhat or Fedora Linux

If you want to clear out your swap you can use the following commands. #free               total        used        free      shared  buff/cache   available Mem:       16266516     5208028     8793132       96412     2265356    10509976 Swap:       8269820           10000    8259820 Then we use this command to disable swap: $ swapoff -a   You can confirm that it's now empty:    #free               total        used        free      shared  buff/cache   available Mem:       16266516     5208028     8793132       96412     2265356    10509976 Swap:       8269820                  0      8269820   we  re-enable our swap: #swapon -a

How do you empty the buffers and cache memory on Redhat or Fedora Linux

Emptying the buffers cache We can signal the Linux Kernel to drop various aspects of cached items by changing the numeric argument to the above command. To free pagecache: # echo 1 > /proc/sys/vm/drop_caches To free dentries and inodes: # echo 2 > /proc/sys/vm/drop_caches To free pagecache, dentries and inodes: # echo 3 > /proc/sys/vm/drop_caches      If you ever want to empty it you can use this chain of commands.   [root@localhost]#free && sync && echo 1 > /proc/sys/vm/drop_caches && free total used free shared buff/cache available Mem: 16266516 5208028 8793132 96412 2265356 10509976 Swap: 8269820 0 8269820 total used free shared buff/cache available Mem: 16266516 5209212 10645992 96412 411312 10582088 Swap: 8269820 0 8269820