Ask The Real Tom

July 30, 2009

Solaris System Commands for Oracle DBA’s

Filed under: operating system,oracle — Tags: , , , , , — admin @ 8:21 am

During my work as Oracle DBA with the focus on performance tuning I have to check often stuff on the system level.

Here I like to share my command list for checking importent stuff on solaris 10.

cpu count

psrinfo -v

cpu info

 mpstat  #report per-processor statistics


/usr/sbin/prtconf | grep Mem
Memory size: 16384 Megabytes

64 or 32 bit

isainfo -v # available
uname -a   # running
isainfo -kv #active

show system error codes

man -s2 intro

Edit / Show process priority


Installed Software

 pkginfo | grep VERITAS


getfacl foo
setfacl -m user:jeff:rw- foo

Trace process

truss -p <pid>

Summary about system calls

truss -c -p <pid>

Follow forked childs

truss -f <cmd>

Prozess wait statistics

truss -c -p <pid>

DTrace dynamic tracing compiler and tracing utility


Examples dtrace

# New processes with arguments,
dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs); }'

# Files opened by process,
dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }'

# Syscall count by program,
dtrace -n 'syscall:::entry { @num[execname] = count(); }'

# Syscall count by syscall,
dtrace -n 'syscall:::entry { @num[probefunc] = count(); }'

# Syscall count by process,
dtrace -n 'syscall:::entry { @num[pid,execname] = count(); }'

# Disk size by process,
dtrace -n 'io:::start { printf("%d %s %d",pid,execname,args[0]->b_bcount); }'   

# Pages paged in by process,
dtrace -n 'vminfo:::pgpgin { @pg[execname] = sum(arg0); }'

Dtrace References

report user-level lock statistics


report kernel lock and profiling statistics


Print the /proc tracing flags, the pending and held signals, and other /proc status information for each lwp in each process.


process tree


sysdef – output system definition

sysdef -i

ex. max processe kernel parameter

user@abc:/tmp $ sysdef -i |grep proc
  30000        maximum number of processes (v.v_proc)
  29995        maximum processes per user id (v.v_maxup)
  100  max undo entries per process (SEMUME)
  250  max attached shm segments per process (SHMSEG)
% prtconf | grep Mem
Memory size: 32760 Megabytes

% id -p
uid=59008(oracle) gid=10001(dba) projid=3(default)

% prctl -n project.max-shm-memory -i project 3
project: 3: default
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
        privileged      7.84GB      -   deny                                 -
        system          16.0EB    max   deny                                 -
 prctl -n project.max-shm-memory -i project oracle

solaris 10

kernel parameter check

Take a userprocess id (ps -ef |grep ..)

prctl  <pid>

all parameter

prctl -i project oracle

Management Commands

Commands for managing project attributes include the following:

   * projects: Displays project memberships for users, lists projects from the project database, prings information on given projects.
   * newtask: Executes the shell or command in a new task in the current project.
   * projadd: Adds a new entry to the /etc/project entry.
   * projmod: Modifies information for a project in /etc/project.
   * projdel: Deletes a project from /etc/project.
   * rctladm: Displays/modifies global state of active resource controls, sets logging or actions.
   * prctl: Displays/modifies local resource controls.
   * ipcs: Identifies which IPC objects are being used in a project.
   * rcapadm: Manages rcapd memory-capping daemon.
   * prstat -J: Displays resource consumption on a per-project basis
   * priocntl -i project-name: Sets/displays scheduling parameters of the project.
   * poolbind -i project-name: Assigns a project to a resource pool.

process info

Memory by process (rss in kb)

ps -e -o pid,vsz,rss,comm |grep <cmdname>

Sumarize memory of a set of processes

ps -e -o pid,vsz,rss,comm |grep java|awk '{sum = sum + $2} END {print sum}'
ps -ly

GUI – top


May 4, 2009

Is Sun’s ZFS ready for Production (with Oracle Databases)?

Filed under: operating system,oracle — Tags: , , , , — admin @ 9:38 am

Answer: No!


  1. There are lot of things to tune, to get ZFS running with similar perfomance as on vxfv or ASM
  2. We hat frequent system hanging issues on several high load Oracle 10g Databases (only reboot hepled)
  3. Sun doe not really publish a real bug list, everthing you find form sun are maketing paper which tell you how cool ZFS is
  4. To find the truth you have search for blogs, forums, mailinglist with thousands of people reporting problems with ZFS
  5. No advantage of using ZFS. vxfs runs stable for more than 10 year, ASM runs stable for more than 5 years, ZFS still full of bugs

ZFS = Code + lots of Marketing

Run Oracle on vxfs or ASM (if you use solaris)

Update: The official bug list from Sun is here,

There are currently two bug listet (where are alle the others ?)

May 15, 2008

Solaris error 12, not enough space

Filed under: operating system — Tags: , , , , , — admin @ 11:37 pm

Who don’t know the Solaris errors:

  • unable to fork a process
  • Solaris error 12, not enough space
  • TNS-12500, TNS-12540, TNS-12560, TNS-00510

This errors are memory or swap related. Spezially swap allocation seems to be a mystery under solaris.
A description about solaris system errors is avaliable with the command:

man -s2 intro

So the question is: How much swap space do I need on solaris to run a oracle database?

An extract from somewhere describing solaris swap allocation:

The Virtual Swap Reserved is 12 gigabytes. This is the same as the application memory
size shown in the prtmem output. This is because for each application page a
corresponding backing storage is reserved on disk even though it is not being used. This
storage is just in case the system reaches critical shortage and the page has to be copied
out to disk during a write.

So if don’t want to deal with this error, just allocate at leas as much swap space as you have physical memory. Even your system administrator tell you something else (he don’t know).

Powered by WordPress