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

psrinfo | wc -l
psrinfo  -v
psrinfo  -p
psrinfo [-v] [-p] [processor_id ...]
psrinfo -s [-p] processor_id

# -------------- 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 scrube -s oradata

zfs list -o space
zfs df -h - Used space + Avail Free space is less than the Total size of /home
Free space on ZFS file system unexpectedly missing 

Querying ZFS Storage Pool Status 

df -h /u*
du -c; du -sh .; df -h /u* 
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 -t snapshot
zfs list -t all

zfs list /u50
zfs list orabin/u50

zpool list /u50

zfs list -r -o space
zfs list -r

zfs status

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

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

mount
/u11 on redologs1/u11 read/write/setuid/devices/rstchown/nonbmand/exec/xattr/atime/dev=4950a84 on Wed Oct 24 00:05:51 2018
/u13 on redologs1/u13 read/write/setuid/devices/rstchown/nonbmand/exec/xattr/atime/dev=4950a85 on Wed Oct 24 00:05:51 2018


man zpool
zpool help
zpool status

zpool help status
zpool help clear
zpool help scrub

#zpool -v: verbose
zpool status -v oradata

#zpool -x: Display status only for pools that are exhibiting errors or are otherwise unavailable
zpool status -x oradata

zpool status
zpool status -l
zpool status oradata
zpool clear oradata
zpool scrub oradata

zfs list -r datapool
zpool list
zpool list my_zpool_name eg: zpool list orabin

zpool list orabin1
zpool status orabin1
zpool get all orabin1

zpool list rpool
zpool status rpool
zpool get all rpool

zpool list
zpool list -o name,size
zpool list -Ho name
zpool list -H -o name,size

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

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