aix

I am in the process of putting my notes into web pages, please keep checking in later for more contents

quick link


top   prev   next  

add space to existing mount point

lsvg:
===============================================

#To increase space on the filesystem.
step 1): df -k /backups # look for device name hd4

Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4          1048576    917684   13%     4945     3% /

step 2): from device name to volume group 
lslv hd4        # Command is lslv
LOGICAL VOLUME:     hd4                    VOLUME GROUP:   rootvg

step 3): use lsvg to list volume group, 
lsvg  volume_group #to check the available space.

lsvg rootvg #look for FREE PPs

VOLUME GROUP:       rootvg                   VG IDENTIFIER:  000947ea0000d4000000012a630ce307
VG STATE:           active                   PP SIZE:        256 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      63 (16128 megabytes)
MAX LVs:            256                      FREE PPs:       0 (0 megabytes)
LVs:                11                       USED PPs:       63 (16128 megabytes)
OPEN LVs:           10                       QUORUM:         2 (Enabled)
TOTAL PVs:          1                        VG DESCRIPTORS: 2
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         1                        AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     1016                     MAX PVs:        32
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable

step 4): use chfs to add space
#commented_for_accidental_run chfs -a size=+10000M /backups # Increase by 10GB .


top   prev   next  

Basic Aix Commands Related to Oracle

# ----------------------------
1): check hostname and ip address

hostname
ping -a `hostname`
ifconfig -a

2): checking etc hosts
ls -l /etc/hosts

3): check oratab
ls -lart /etc/oratab

4): temp directory location
export TMPDIR=/tmp/oratemp
mkdir -p /tmp/oratemp
sudo chown oracle:dba /tmp/oratemp

5): check the following to see whether root.sh has already been run
ls -lart /usr/local/bin/oraenv
if not presented,
sudo $ORACLE_HOME/root.sh

6): which whereis
which which
ls -lart /usr/bin/whereis
sudo ln -s /usr/bin/which /usr/bin/whereis

7): slow login
-- skip slow quota command
touch .hushlogin
-- but ok on the following server

8): convert a process to nohup
kill -STOP 13015000
sleep 2
kill -CONT 13015000

# ----------------------------

Oracle DB oratab:
/etc/oratab

# ----------------------------

# If using X-Window, set the following environment variable to avoid Motif package installation
export AWT_TOOLKIT=XToolkit
xdpyinfo

# or install x-windows motif
export AWT_TOOLKIT=Xtoolkit

export TMPDIR=/home/oracle


top   prev   next  

Oracle Installation On Unix

1):  # determine hostname is set correctly, before run runInstaller
hostname
ping `hostname`

export ORACLE_HOSTNAME=myhost

unset ORACLE_HOME
unset ORACLE_BASE
unset ORACLE_SID
unset TNS_ADMIN

vi /etc/hosts

more /etc/oratab

oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall



more /etc/oraInst.loc

2): user management

smit security
smit chuser
smit chgsys

id oracle
id grid

grep oinstall /etc/group

umask # see current setting

umask 022
umask 077

umask 007
chmod -R o-rwx ~

echo $SHELL

echo $DISPLAY

export TMP=/tmp
export TMPDIR=/tmp

3): Kernel setup
# determine os level
oslevel -s
# 5300-11-01-0944


# To determine the RAM size
/usr/sbin/lsattr -E -l sys0 -a realmem

# QUEUE_DEPTH
lsattr -El hdisk2|grep queue_depth

# To determine the size of the configured swap space 
/usr/sbin/lsps -a

# determine 64-bit or 32-bit
/usr/bin/getconf HARDWARE_BITMODE

# To determine the supported kernel mode
getconf KERNEL_BITMODE

# To determine if the system is started in 64-bit mode
#need_root bootinfo -K

df -k /tmp
export TEMP
export TEMPDIR
export TMP
export TMPDIR

lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat \
bos.perf.libperfstat bos.perf.proctools

# To determine if an APAR is installed
/usr/sbin/instfix -i -k "IZ42940 IZ49516 IZ52331 IZ41855 IZ52319"

/usr/sbin/instfix -i|grep -v "No filesets"

/usr/sbin/instfix -i|grep "were found"
/usr/sbin/instfix -i|grep  -e -v "IZ|IY|IZ"|grep "were found"

bos.adt.base
bos.adt.lib
bos.adt.libm
bos.perf.libperfstat
bos.perf.perfstat
bos.perf.proctools
xlC.rte
gpfs.base

xlC.aix50.rte
xlC.aix61.rte


-- ----------
# query UDP and TCP Kernel Parameters
/usr/sbin/no -a | fgrep ephemeral

       tcp_ephemeral_high = 65535
        tcp_ephemeral_low = 32768
       udp_ephemeral_high = 65535
        udp_ephemeral_low = 32768

# change UDP and TCP Kernel Parameters
# /usr/sbin/no -p -o tcp_ephemeral_low=9000 -o tcp_ephemeral_high=65500
# /usr/sbin/no -p -o udp_ephemeral_low=9000 -o udp_ephemeral_high=65500

-- ----------

#5.x       lsattr -El aio0 -a maxreqs
#6.1_above ioo -o aio_maxreqs

#aioserver ( number of asynchronous I/O servers )
ps -ek|grep -v grep|grep -v posix_aioserver|grep -c aioserver

-- ----------

# list disk at hardware level
/usr/sbin/lsdev -Cc disk

# Finding Device 
lsdev -Cc adapter -spci | grep fcs

# configure new disk
/usr/sbin/cfgmgr

# disk group and the physical disks
$ /usr/sbin/lspv
hdisk0          000947ea630ce2a2                    rootvg          active
hdisk2          000947ea68e31722                    asdbvg          active

lspv diskname
lspv hdisk7
lqueryvg -Atp   hdisk7

# to clear the PVID from each disk device that you want to use
#dangerous /usr/sbin/chdev -l hdiskn -a pv=clear

chown oracle:dba /dev/rhdiskn
chmod 660 /dev/rhdiskn

# adapters
lsdev -Cc adapter | grep ent

# network ip address
ifconfig -a
lscfg -vl ent0

# Software stack
lslpp -l | more

To find the io wait on unix        : sar

To get the number of unix process  : lsdev -C |grep -i proce


top   prev   next  

swap space

# swapinfo:
lsps -a
lsps -s
swap -l
swapspace tuning
vmstat 1 5
vmstat 2 3

svmon -P my_pid

uptime

vmo -p -o minperm%=5
vmo -p -o maxperm%=90
vmo -p -o maxclient%=90

vmo -a | grep free

vmo -a | grep lru


top   prev   next  

shutdown or reboot

# --------------------------------------------------------------------
#reboot aix 
#commented_to_avoid_accidental_run shutdown -Fr

#shutdown aix
#commented_to_avoid_accidental_run shutdown -F

# --------------------------------------------------------------------

top   prev   next