Friday, August 19, 2016


Storage Management add ASM

 Oracleasm Disk Add


Check the Server OS and the version.

#lsb_release -d
Description:    Red Hat Enterprise Linux Server release 5.11 (Tikanga)

#rpm -qa | grep -i oracleasm
oracleasm-2.6.18-274.12.1.el5-2.0.5-1.el5
oracleasm-2.6.18-348.6.1.el5-2.0.5-1.el5
oracleasm-2.6.18-407.el5-2.0.5-1.el5
oracleasm-2.6.18-408.el5-2.0.5-1.el5

  1. #uname -a
  2. Linux Server1 2.6.18-408.el5 #1 SMP Fri Dec 11 14:03:08 EST 2015 x86_64 x86_64 x86_64 GNU/Linux

If the oracle ASM driver not tally you have to install same driver. 


Check for the last HDD 

#ls /dev/sd*
dev/sdl 

Add the HDD from VM ware console

Add new HDD to the VM guest.
#for scan in /sys/class/scsi_host/host*/scan; do echo '- - -' > $scan; done

Check for the new HDD
#ls /dev/sd*
dev/sdm

========================================================================

Format the HDD which support for the Oracleasm

#fdisk -u /dev/sdm

o
n
p
1
32768
default
w

========================================================================



Check for the Current oracle ASMDISK
#oracleasm listdisks

Check for the oracleasm Path.
#which oracleasm

========================================================================


Add HDD to the oracle ASM

ASM RHEL 5

#/etc/init.d/oracleasm createdisk ASM_SERVER1_3 /dev/sdm1
#/etc/init.d/oracleasm scandisks
#oracleasm listdisks


ASM RHEL 6
pvcreate
/usr/lib/oracleasm/oracleasm-write-label /dev/sd<X>1 ASM_<hostname>_1

========================================================================

Wednesday, July 20, 2016

Linux server Memory usage

Linux server Memory usage 


Below cmd  can get the memory information process wise

ps aux  | awk '{print $6/1024 " MB\t\t" $11}'  | sort -n

Monday, January 11, 2016

Supervisor Install

Supervisor

Why Supervisor?

Supervisor is a client/server system that allows its users to control a number of processes on UNIX-like operating systems. It was inspired by the following:

Features
Simple
Centralized
Efficient
Extensible
Compatible
Proven

Installation: Cent OS / Ubuntu


Supervisor Installation Cent OS (3.1.3)

Server IP:       192.168.30.128
Server OS:        CentOS release 6.7
#yum install python-setuptools
#easy_install supervisor
#supervisord --version
#vi /etc/supervisord.conf

Create a config file

# echo_supervisord_conf > /etc/supervisord.conf
Running the service
#Touch /etc/rc.d/init.d/supervisord                                                                                                                           
Add below scrip to above file

#!/bin/bash

. /etc/init.d/functions

DAEMON=/usr/bin/supervisord
PIDFILE=/var/run/supervisord.pid

[ -x "$DAEMON" ] || exit 0

start() {
        echo -n "Starting supervisord: "
        if [ -f $PIDFILE ]; then
                PID=`cat $PIDFILE`
                echo supervisord already running: $PID
                exit 2;
        else
                daemon  $DAEMON --pidfile=$PIDFILE -c /etc/supervisord.conf
                RETVAL=$?
                echo
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/supervisord
                return $RETVAL
        fi

}

stop() {
        echo -n "Shutting down supervisord: "
        echo
        killproc -p $PIDFILE supervisord
        echo
        rm -f /var/lock/subsys/supervisord
        return 0
}

case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    status)
        status supervisord
        ;;
    restart)
        stop
        start
        ;;
    *)
        echo "Usage:  {start|stop|status|restart}"
        exit 1
        ;;
esac
exit $?

Allow executable permission to the /etc/rc.d/init.d/supervisord
#nano /etc/rc.d/init.d/supervisord
#chmod 755 /etc/rc.d/init.d/supervisord

Please uncomment below line from  : /etc/supervisord.conf



Add the below command to : /etc/rc.local
/etc/init.d/supervisord start




Creating process pools


Create pool
Group name: pool1
Programs: web4 / web5

vi /etc/supervisor/conf.d/pool1.conf

[group:pool1]
programs=web4,web5

[program:web4]
command=java -jar stability-1.0-SNAPSHOT-jar-with-dependencies.jar dev
directory=/opt/85
autostart=true
autorestart=true
startretries=3
stderr_logfile=/var/log/web4/web4.err.log
stdout_logfile=/var/log/web4/web4.out.log

[program:web5]
command=java -jar stability-1.0-SNAPSHOT-jar-with-dependencies.jar dev
directory=/opt/86
autostart=true
autorestart=true
startretries=3
stderr_logfile=/var/log/web5/web5.err.log
stdout_logfile=/var/log/web5/web5.out.log



After that restart the supervisord
# /etc/init.d/supervisord restart

How to stop, start or restart.
 
Supervisorctl
 
 
start <name>        Start a process
start <gname>:*     Start all processes in a group
start <name> <name> Start multiple processes or groups
start all       Start all processes
           

Web log in URL.



 


Superlance

Superlance is a set of additional plugins for Supervisor, that includes plugins for sending email or SMS alerts when a Supervisor process exists unexpectedly, for monitoring memory usage of Supervisor processes, and a few other useful monitoring and alerting utilities. You can also install it via EasyInstall:
$ easy_install superlance


Related Other product
1.      Circus




Sunday, July 5, 2015

Apache: Not safe to rely on the system's timezone settings


Unable to access web mail or page



Error Message 

Check the HTTP log error message.
tail -F /var/log/httpd/error_log

Tue Aug 06 11:42:25 2013] [error] [client 192.168.2.54] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /var/www/IlohaMail/include/ryosimap.inc on line 106, referer: http://201.110.65.78/index.php


 
Task 1
 Update time zone data.
Yum upgrade tzdata

Task 2
 Take backup.
mv /etc/localtime /etc/localtime.BAK

Task 3
Copy the time zone info.
cp -rp /usr/share/zoneinfo/Asia/Colombo /etc/localtime

 
Task4
  
Check the date.
 Date

If the date incorrect please set the correct time
 Date –s” Tue Aug  6 13:54:43 IST 2014”


Task5

vim /etc/php.ini

1. Locate the php.ini file - the default location is etc/php.ini

vim /etc/php.ini

2. Search for 'timezone' in php.ini file

3. Change

date.timezone =
date.timezone = "Asia/Colombo"
 "whatever specific timezone you are in"





Comments System

Disqus Shortname