The execution of scripts is made versatile by the ability to run a script based on arguments supplied on the command line. In this way, the operation of the script varies depending on what arguments are given to the script. The shell automatically assigns special variable names, called positional parameters, to each argument supplied to […]
Archives for January 2018
Bash if loop examples (if then fi, if then elif fi, if then else fi)
The if Statement The if statement allows you to specify courses of action to be taken in a shell script, depending on the success or failure of some command. It is a conditional statement that allows a test before performing another statement. The syntax for the simplest form is: if [ condition ] then block_of_statements […]
Oracle Solaris Cluster : Understanding quorum votes and quorum devices (How to avoid Failure Fencing and Amnesia)
Need for Quorum Voting A quorum device is a shared storage device. A quorum server is shared by two or more nodes to contribute votes that are used to establish a quorum. Clusters operate only when a quorum of votes is available. Describing Quorum Votes and Quorum Devices The cluster membership subsystem of the Oracle […]
Understanding /etc/xinetd.d directory under Linux
xinetd daemon The xinetd daemon is a TCP wrapped super service which controls access to a subset of popular network services including FTP, IMAP, and telnet. It also provides service-specific configuration options for access control, enhanced logging, binding, redirection, and resource utilization control. When a client host attempts to connect to a network service controlled […]
Understanding /etc/xinetd.conf file in Linux
xinetd daemon The xinetd daemon is a TCP wrapped super service which controls access to a subset of popular network services including FTP, IMAP, and telnet. It also provides service-specific configuration options for access control, enhanced logging, binding, redirection, and resource utilization control. When a client host attempts to connect to a network service controlled […]
How to work with multiple java versions under Linux
The Problem I installed a new version of the Java Runtime Environment but the “java -version” command does not show the new version. # java -version java version “1.7.0_65” OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17) OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode) The Solution This problem could happen due to multiple installs of java on […]
How to configure multicast on an IP address (interface)
Multicast can be used to send IP packets to a group of interested receivers. Compared with broadcast, the packets are only sent to the members of a multicast group with the help of a multicast router. Multicast Addresses Class D addresses (224.0.0.0 – 239.255.255.255) are assigned to multicast. So the first 4 bits of a […]
CentOS / RHEL 7 : sysctl kernel parameter doesn’t take effect after reboot
The Problem sysctl parameter didn’t take effect after a reboot on RHEL 7 server. Parameter “net.ipv4.conf.all.forwarding” was disable before rebooting the server. # cat /proc/sys/net/ipv4/conf/all/forwarding 1 # sysctl net.ipv4.conf.all.forwarding=0 net.ipv4.conf.all.forwarding = 0 # cat /proc/sys/net/ipv4/conf/all/forwarding 0 #cat /etc/sysctl.conf|grep net.ipv4.conf.all.forwarding net.ipv4.conf.all.forwarding = 0 # shutdown -r now # cat /proc/sys/net/ipv4/conf/all/forwarding ### Gets enabled after reboot. 1 […]
How to query and modify kernel parameters using sysctl (Immediately and persistently) in CentOS / RHEL
The purpose of this post is to explain how to configure kernel parameters on Red Hat (RHEL/CentOS) and Oracle Linux (OL) systems using the sysctl utility. The sysctl utility (/sbin/sysctl) allows (privileged) users to query and modify kernel parameters during runtime. The utility is common to most Linux distributions, however, subtle differences may exist between […]
Understanding “Holding a ZFS Snapshot” Feature
What is “Holding a ZFS Snapshot” feature Remote replication of ZFS datasets can result in different automatic snapshot policies on the two sides of a replication pair. For example, the sending side may want to keep five snapshots at one-minute intervals, whereas the receiving side may want to keep 10 snapshots at one-minute intervals. This […]