Writing About Our Experiences With Oracle Databases
Friday September 3rd 2010

Latest Topics

Effect Of Multiple SHMMAX Settings

Last week I saw a warning message at database startup time saying: WARNING: EINVAL creating segment of size [Read More]

Finding blogging tough? Just copy and do find and replace

Finding blogging tough? Just copy and do find and replace

Well this is motto followed by Guenadi Jilevski for his blog http://gjilevski.wordpress.com and he seems to get result [Read More]

Physical Corruption: ORA-1578 part 3

Recently we encountered a block corruption issue in 10g database on Linux x86 64 bit and using ASM for storing database [Read More]

Cloning RAC Database with RMAN fails with error

Steps for cloning a RAC database  with RMAN is similar to cloning a single instance database. But while using rman [Read More]

DBMS_SCHEDULER jobs not running?

I came across this posting on OTN which lists down things to check in case your scheduler job is not . This is quite [Read More]

Unix Reference

We intend to keep this page as easy reference for Unix commands/links which are useful to DBA in day – day work.  If you too have some command’s which can be useful , then you can use the comment’s section to add it and we will include in main page after cross-checking it. In case there are any corrections, then also let us know.

These commands will be categorised into Generic, AIX, Solaris, Linux and HP-UX.

AIX

Number of Cpu’s

$/usr/sbin/lsdev -C -c processor -S Available| wc -l

Memory Details

$/usr/sbin/lsattr -E -l sys0 -a realmem

Swap Configured

$/usr/sbin/lsps -a

To find maximum processes allowed and change it to 10000

$lsattr -El sys0 -a maxuproc
#chdev -l sys0 -a maxuproc='10000'

Find memory utilization by process on AIX

ps axwv | awk '{t=t+$7 - $10 ;print $7 - $10,$1,$11,$12,$13}END{print t}' | sort -rn | pg

Script for Monitoring memory just like vmstat
===============================================
copy the contents in file like mem_mon.sh

### Usage mem_mon.sh (interval) (occurences) e.g sh mem_mon.sh 2 10 ###
### This will give top 10 memory consuming processes #####
wt_time=$1
lmt=$2
 let a=0
while [[ $a -lt $lmt ]] ; do
ps axwv |sort -nrk 7,7|grep -v "COMMAND" \
|awk 'BEGIN {printf ("MemoryinKb \t ProcessId \t PerCPU \t PerMem \t Command \n")}{t=t+$7 - $10 ;printf("%13d \t %10d \t %6.2f \t %6.2f \t %s \n",$7 - $10,$1,$11,$12,$13)}END{print t}'|head -10
 let      a+=1
sleep $wt_time
done

HP-UX

Number of Cpu’s

$/usr/sbin/ioscan -kfnC processor | grep processor | wc -l

Memory Details

$grep -i Physical: /var/adm/syslog/syslog.log

Swap Configured

$/usr/sbin/swapinfo -a -m

Nic configuration

lanscan -v

Linux
Check number of CPU’s

$cat /proc/cpuinfo

Check memory information

cat /proc/meminfo

Check swap

$swapon -s

Kernel parameter

#/sbin/sysctl -a
cat /etc/sysctl.conf

System error log

/var/log/messages

Nic configuration

ifconfig -a

Useful Links-

Linux file and related commands - http://www.oracle.com/technology/pub/articles/advanced-linux-commands/part1.html

Top,find and snice commands – http://www.oracle.com/technology/pub/articles/advanced-linux-commands/part2.html

free,vmstat,iostat and sar – http://www.oracle.com/technology/pub/articles/advanced-linux-commands/part3.html

ifconfig,netstat (network commands)  - http://www.oracle.com/technology/pub/articles/advanced-linux-commands/part4.html

cpio,tar and Oracle VM – http://www.oracle.com/technology/pub/articles/advanced-linux-commands/part5.html

Solaris

Check number of CPU’s

/usr/sbin/psrinfo -v

Check kernel version

isainfo -kv

Display Swap size

swap -l

List kernel parameters

sysdef -i

List Installed packages

#pkginfo

Nic configuration

ifconfig -a

Generic

Awk Tutorial – http://www.vectorsite.net/tsawk.html

Sed & Awk (Oreilly ebook) – http://docstore.mik.ua/orelly/unix/sedawk/index.htm

  • Share/Bookmark

Leave a Comment

Recent Comments

Ron Gordon had this to say

I had a simillar ORA-15020: discovered duplicate ASM disk issue, our sysadmin determined that there was a BAD Read the post

Can a security group be a member of another group? had this to say

install Oracle and have so many problems with it. My goal is to install it according to this link Read the post

M Tanvir had this to say

Hi Amit, really its great response, bcoz i just new with oracle. Thanks... Read the post

Aman.... had this to say

Hahaha aur sab se badi baat, he is not even ready to accept! jigar chahiye bhai yeh karne aur fir na maanne ke liye :D . Read the post

Dev had this to say

Hi Amit, Thanks for quick reply. It looks fine on my HTC Desire ( Android ) ,so no need to worry about Read the post