Skip to main content

Posts

Showing posts from January, 2016

NTP SERVER RedHat

Server Configuration Install the ntp package: [root@host ~]# yum install ntp Ensure the following entries are in /etc/ntp.conf: The below example functions as a NTP server to the 192.168. network. [root@ntp.server.com ~]# cat /etc/ntp.conf restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery restrict 127.0.0.1 restrict -6 ::1 server stratum2.ntp.com server stratum2.ntp2.com restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap driftfile /var/lib/ntp/drift keys /etc/ntp/keys Note: The public stratum 2 servers for your network's NTP server can be found on ntp.org. Start the ntpd service: [root@ntp.server.com ~]# service ntpd start Client Configuration Ensure the following entries are in /etc/ntp.conf: [root@ntp.client.com ~]# cat /etc/ntp.conf restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery restrict 127.0.0.1 restrict -6 ::1 server ntp.se

Linux. Orphaned connections in CLOSE_WAIT state ( a lot of connections are in CLOSE_WAIT state )

Usually dealing with web servers we have a lot of connections in CLOSE_WAIT state. These connections hold web server threads and also consume our  nofile, nproc  resources described in /etc/security/limits.conf. To prevent such situation we need to adjust some kernel variables: net.ipv4.tcp_keepalive_time  -   the interval between the last data packet sent (simple ACKs are not considered data) and the first keepalive probe; after the connection is marked to need keepalive, this counter is not used any further. net.ipv4.tcp_keepalive_intvl  -  the interval between subsequential keepalive probes, regardless of what the connection has exchanged in the meantime. net.ipv4.tcp_keepalive_probes  -  the number of unacknowledged probes to send before considering the connection dead and notifying the application layer. The first two parameters are expressed in seconds, and the last is the pure number.  This means that the keepalive routines wait for two hours (7200 secs, default valu

Expanding LUN size in Sun Cluster (Oracle Solaris Cluster) Environment

We have Oracle database in Sun Cluster HA configuration with two mount point /u01,/u02. Our task is to expand LUN in /u02 mountpoint. Current configuration  metaset configuration root@sc01-n1:~ # metaset  Set name = testdb-disk, Set number = 1 Host                Owner   sc01-n1            Yes   sc01-n2             Drive Dbase d12   Yes   d13   Yes   d16   Yes   d17   Yes   meta device configuration root@sc01-n1:~ # metastat -s testdb-disk -p testdb-disk/d20 -m testdb-disk/d21 testdb-disk/d22 1 testdb-disk/d21 1 1 /dev/did/rdsk/d16s0 testdb-disk/d22 1 1 /dev/did/rdsk/d17s0 testdb-disk/d10 -m testdb-disk/d11 1 testdb-disk/d11 2 1 /dev/did/rdsk/d12s0 \          1 /dev/did/rdsk/d13s0 did device configuration root@sc01-n2:~ # scdidadm -L 1        sc01-n1:/dev/rdsk/c2t1d0       /dev/did/rdsk/d1      2        sc01-n1:/dev/rdsk/c2t0d0       /dev/did/rdsk/d2      3        sc01-n1:/dev/rdsk/c8t60060E8005621300000062130