Oracle Solaris

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  

memory and configuration

# solaris:
psrinfo

# -------------- memory info ---------------
prtconf
echo "::memstat"|sudo mdb -k
echo "::kmastat"|sudo mdb -k
mdb -k
::memstat
::quit
# -----------------------------------------

pkginfo
prtconf
ifconfig

cat /etc/project

cat /etc/ssh/sshd_config


top   prev   next  

Oracle Installation

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

hostname
ping -a `hostname`
ifconfig -a

2): checking etc hosts
ls -l /etc/hosts
ls -l /etc/inet/hosts
sudo ln -s /etc/inet/hosts /etc/hosts

3): check oratab
ls -lart /etc/oratab
ls -l /var/opt/oracle/oratab
sudo ln -s /var/opt/oracle/oratab /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
/var/opt/oracle/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

sudo pkg search library/motif
sudo pkg search library/motif

sudo pkg install pkg://solaris/library/motif

install motif on solaris

export TMPDIR=/home/oracle


top   prev   next  

Shared Memory and Other Kernel Parameters

-- Oracle installation minimum requirement:
prctl -n project.max-sem-ids -i project default
prctl -n project.max-shm-ids -i project default
prctl -n project.max-shm-memory -i project default

prctl -n project.max-sem-ids -i project group.dba
prctl -n project.max-shm-ids -i project group.dba
prctl -n project.max-shm-memory -i project group.dba

prctl -n process.max-sem-nsems $$
prctl -n process.max-file-descriptor $$
prctl -n process.max-stack-size $$
prctl -n project.max-processes $$
prctl -n task.max-processes $$

id -p
prctl -n project.max-shm-memory -i project default
prctl -n project.max-shm-memory -i project group.dba
prctl -n project.max-shm-memory $$

# view setting
prctl -n project.max-sem-ids -i project default
prctl -n project.max-shm-ids -i project default
prctl -n project.max-shm-memory -i project default

#  view memory limits for a user
prctl -n project.max-shm-memory $$
prctl -n process.max-sem-nsems $$
prctl $$

# modify temp
sudo prctl -n project.max-sem-ids -v 256 -r -i project default  --> server quick installation manual
sudo prctl -n project.max-shm-memory -v 40gb -r -i project default

# modify perm
projmod -sK "project.max-shm-memory=(privileged,40G,deny)" default
projmod -sK "project.max-sem-ids=(priv,128,deny)" default

prctl -n project.max-shm-memory -i project group.dba
sudo prctl -n project.max-shm-memory -v 128gb -r -i project  group.dba
sudo projmod -sK "project.max-shm-memory=(privileged,128G,deny)" group.dba

# --------------------------------------------------------------------
cpu info:
psrinfo -pv
prtconf

# --------------------------------------------------------------------
memory size: prtconf
memory usage:
echo "::memstat"|sudo mdb -k

top   prev   next  

swap space

# --------------------------------------------------------------------
swapinfo:
swap -l -h

top   prev   next  

shutdown or reboot

# --------------------------------------------------------------------
# reboot solaris
#commented_to_avoid_accidental_run /usr/sbin/shutdown -y -i6 -g0
# --------------------------------------------------------------------

top   prev   next  

zfs and zpool

zfs and zpool ommands:

zfs and zpool
zfs help
zfs list
zfs list -o space
zfs list -o name,sharenfs,mountpoint
zfs list -o name,sharenfs,mountpoint,space
zfs list -t filesystem -o name,sharenfs,mountpoint,space
zfs list -t filesystem -o name,used,avail

zfs list -r -o space
zfs list -r

zfs status

zfs get all rpool | grep used
zfs get all oradata1 | grep used

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

zpool help
zpool status

zfs list -r datapool
zpool list
zpool list orabin1
zpool status orabin1
zpool get all orabin1

zpool list rpool
zpool status rpool
zpool get all rpool

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

Cluster Related

# -- check status
/usr/cluster/bin/clrg status

# -- check cluster health
/usr/cluster/bin/cluster status


nfs mount points

# get current mount options
mount -p