Posts

Showing posts from July, 2017

AIX commands to increase the file system space

The below commands will increase the file system space after the disk space is increased. where   <FILE_SYSTEM>  is where you want to increase the space. for example /home <VOLUME_NAME> for example hd1 < VOLUME_GROUP> for example rootvg df -k <FILE_SYSTEM> lslv <VOLUME_NAME> lsvg  <VOLUME_GROUP> chvg -g <VOLUME_GROUP> chfs -a size=3G <FILE_SYSTEM>    --   allocates 3GB for the file system chfs -a size=3000M  <FILE_SYSTEM> -- alllocates 3000 MB for the file system chfs -a size=+1G  <FILE_SYSTEM>      -- allocates additional 1GB to the file system chfs -a size=+500M  <FILE_SYSTEM> -- allocates additional 500MB to the file system

DB2 backup procedure

The below script-let will backup the DB2 config , DB and DB Config by getting the DB names dynamically. Here <BACKUP_DIR> can be any folder where you want to place the backups. <INSTANCE_NAME> is db instance name. for DB_NAME in `db2 list db directory |grep -ip indirect |grep -i alias |awk '{print $4}'` do             echo "DB_NAME: ${DB_NAME}"             db2 connect to ${DB_NAME}             db2 backup database ${DB_NAME} to <BACKUP_DIR>             db2 list tablespaces show detail > <BACKUP_DIR>/tablespaces.out             db2 get db cfg for ${DB_NAME} show detail > <BACKUP_DIR>/dbcfg.out             db2support <BACKUP_DIR> -d ${DB_NAME} done         db2 force applications all db2 terminate db2stop /home/${INSTANCE_NAME}/sqlli...

WAS Restart Script

This Script start and stop the WebSphere Services You can see the usage by just running the ./was_restart.sh was_restart.sh ACTION=$1 WAS_PROFILE_PATH=$2 WAS_DMGR_PROFILE=$3 WAS_APP_PROFILE=$4 WAS_USER=$5 WAS_PASSWORD=$6 HOSTNAME=$7 SOAP_PORT=$8 usage() {      echo -e "***************************************************************************************"      echo -e "USAGE: ./was_restart.sh <ACTION> <WAS_PROFILE_PATH> <WAS_DMGR_PROFILE> <WAS_APP_PROFILE> <WAS_USER> <WAS_PASSWORD> <HOSTNAME> <SOAP_PORT>**********"      echo -e "***************************************************************************************"      echo -e "WARN: USAGE: <ACTION> must be one of the following options:                            "      echo -e ""      echo -e "start ...

MQ Restart Script

This script dynamically start and stop the MQ. Usage: ./mq_restart.sh <Action> Here <Action > must be start or stop. mq_restart.sh ACTION=$1 usage() {      echo -e "      ******************************************"      echo -e "      WARN: USAGE: $0 must be one of the following options:   "      echo -e ""      echo -e "      start - starts All the QMGRs exists in the server         "      echo -e "      stop  - stops All the QMGRs exists in the server          "      echo -e "      ******************************************"      exit 1 } STARTEDQMGR="" STOPPEDQMGR="" get_info(){      STARTEDQMGR=`dspmq|grep "Running" |awk -F"(" '{print $2}'|awk -F")" '{print $1}'`      STOPPEDQMGR=`ds...