Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 









Oracle UNIX Kill Command Administration

Oracle UNIX/Linux Tips by Burleson Consulting

The UNIX Kill command

As we noted in Chapter 1, there are times when it is necessary to kill all Oracle processes, or a selected set of Oracle processes.  You may want to kill all Oracle processes when the database is "locked" and he cannot enter server manager are gracefully stop the database.

When you are forced to terminate Oracle on a UNIX server, you have to perform the following steps:

1. Kill all Oracle processes associated with the ORACLE_SID

2. Use the ipcs ?pmb command to identify all held RAM memory segments, the then use the ipcrm ?m command to release the RAM memory from UNIX.

3. (non_AIX) Use the ipcs -sa command to display held semaphores and then use the ipcrm ?s command to release the held semaphores for the instance

As we noted in Chapter 1, we can create a single command to terminate all Oracle processes associated with your hung database instance.

root> ps -ef|grep $ORACLE_SID| \
      grep -v grep|awk '{print $2}'|xargs -i kill -9 {}  

We can then check for held memory using the ipcs -pmb command and remove the memory held by the database:

root> ipcs -pmb
IPC status from /dev/kmem as of Mon Sep 10 16:45:16 2001

Shared Memory:

m   24064 0x4cb0be18 --rw-r----- oracle    dba 28975104  1836 23847
m       1 0x4e040002 --rw-rw-rw-   root   root    31008   572   572
m       2 0x411ca945 --rw-rw-rw-   root   root     8192   572   584
m    4611 0x0c6629c9 --rw-r-----   root   root  7216716  1346 23981
m       4 0x06347849 --rw-rw-rw-   root   root    77384  1346  1361

Here we see that the only RAM memory segment owned by Oracle is ID=24064.  The following command will release this memory segment:

root> ipcrm ?m 24064

Killing stubborn UNIX processes

There are times when a UNIX process cannot be killed, even with the powerful kill -9 command.  In these cases, a special trick is required to force the UNIX task to terminate.  If you have a situation where a process continues to display with the ps command, even after you have issued a kill -9 command against the process, you can use this trick.

The stubborn process can be killed by piping the null device (/dev/null) to the ttyname as a part of the kill command.  The following command is indispensable when killing stubborn UNIX tasks:

      cat /dev/null > /dev/ttyname kill ?9 pid#

Displaying Kernel Values in UNIX

UNIX has a wealth of kernel parameter that are very important to the Oracle professional. The setting for memory, semaphores and other kernel tuning parameters can have a huge impact on the performance of the Oracle server.  We will begin with a general overview of the commands used to display kernel values in each major dialect of UNIX.

Displaying Server Values in HP/UX

The HP/UX dialect of UNIX we have different commands depending on the version of UP/UX that you are running.  In all versions of HP/UX, the lsdev command will display the names of all of the devices on your UNIX server. 

root> lsdev
    Character     Block       Driver          Class
        0          -1         cn              pseudo
        3          -1         mm              pseudo
       16          -1         ptym            ptym
       17          -1         ptys            ptys
       27          -1         dmem            pseudo
       28          -1         diag0           diag
       46          -1         netdiag1        unknown
       52          -1         lan2            lan

In HPUX v 11 the command is different.  Here we display all kernel parameters for an HP/UX version 11 server.

root> kmtune

Parameter            Value
NSTREVENT            50
NSTRPUSH             16
NSTRSCHED            0
STRCTLSZ             1024
STRMSGSZ             65535
acctresume           4
acctsuspend          2
aio_listio_max       256
aio_max_ops          2048
aio_physmem_pct      10
aio_prio_delta_max   20
bufcache_hash_locks  128
bufpages             (NBUF*2)
chanq_hash_locks     256
create_fastlinks     0
dbc_max_pct          50
dbc_min_pct          5
default_disk_ir      0
desfree              0
dnlc_hash_locks      64
dontdump             0
dskless_node         0
dst                  1
initmodmax           50
io_ports_hash_locks  64
iomemsize            40000
lotsfree             0
max_async_ports      50
max_fcp_reqs         512
max_mem_window       0
max_thread_proc      64
maxdsiz              0x04000000
maxdsiz_64bit        0x0000000040000000
maxfiles             60
maxfiles_lim         1024
maxqueuetime         0
maxssiz              0x00800000
maxssiz_64bit        0x00800000
maxswapchunks        512
maxtsiz              0x04000000
maxtsiz_64bit        0x0000000040000000
maxuprc              (NPROC-130)
maxusers             350
maxvgs               10
mesg                 1
minfree              0
modstrmax            500
msgmap               (2+MSGTQL)
msgmax               8192
msgmnb               16384
msgmni               50
msgseg               2048
msgssz               8
msgtql               40
nbuf                 0
ncallout             (16+NPROC)
ncdnode              150
nclist               (100+16*MAXUSERS)
ncsize               (NINODE+VX_NCSIZE)
ndilbuffers          30
netisr_priority      -1
netmemmax            0
nfile                (90*(NPROC+16+MAXUSERS)/10+32+2*(NPTY+NSTRPTY+NSTRTEL))
nflocks              500
nhtbl_scale          0
public_shlibs        1
region_hash_locks    128
remote_nfs_swap      0
rtsched_numpri       32
scroll_lines         100
scsi_maxphys         1048576
sema                 1
semaem               16384
semmap               (SEMMNI+2)
semmni               200
semmns               800
semmnu               30
semume               10
semvmx               32767
sendfile_max         0
shmem                1
shmmax               1073741824
shmmni               500
shmseg               300
st_ats_enabled       1
vx_ninode            0
vx_noifree           0
vxfs_max_ra_kbytes   1024
vxfs_ra_per_disk     1024

The kmtune command can be refined with the grep command to only display desired classes of values.  For example, below, we add the grep command to only display shared memory variables:

root> kmtune|grep -i shm

shmem                1
shmmax               1073741824
shmmni               500
shmseg               300

Displaying Server Kernel values in AIX UNIX

The basic command to display server values in AIX is the lsdev -C command.  This command will display all of the attached components including disk, memory, CPU?s, busses and other hardware components:

root> lsdev -C

sys0       Available 00-00           System Object
sysplanar0 Available 00-00           System Planar
pci0       Available 00-fef00000     PCI Bus
pci1       Available 00-fed00000     PCI Bus
isa0       Available 10-58           ISA Bus
sa0        Available 01-S1           Standard I/O Serial Port
sa1        Available 01-S2           Standard I/O Serial Port
siokma0    Available 01-K1           Keyboard/Mouse Adapter
fda0       Available 01-D1           Standard I/O Diskette Adapter
scsi0      Available 10-60           Wide SCSI I/O Controller
pci2       Defined   20-78           PCI Bus
sioka0     Available 01-K1-00        Keyboard Adapter
sioma0     Available 01-K1-01        Mouse Adapter
hdisk0     Available 10-60-00-0,0    16 Bit SCSI Disk Drive
hdisk1     Available 10-60-00-1,0    16 Bit SCSI Disk Drive
lvdd       Available                 LVM Device Driver
mem0       Available 00-00           Memory
proc0      Available 00-00           Processor
proc1      Available 00-01           Processor
proc2      Available 00-02           Processor
proc3      Available 00-03           Processor
L2cache0   Available 00-00           L2 Cache
pmc0       Available 00-00           Power Management Controller
tty0       Available 01-S1-00-00     Asynchronous Terminal
rootvg     Defined                   Volume group
inet0      Available                 Internet Network Extension
en2        Defined                   Standard Ethernet Network
et0        Defined                   IEEE 802.3 Ethernet Network
lo0        Available                 Loopback Network Interface
pty0       Available                 Asynchronous Pseudo-Terminal
gxme0      Defined                   Graphics Data Transfer Assist
rcm0       Defined                   Rendering Context Manager
aio0       Available                 Asynchronous I/O
ssa0       Available 10-70           IBM SSA 160 SerialRAID Adapter
ssa1       Available 20-60           IBM SSA 160 SerialRAID Adapter
ssar       Defined                   SSA Adapter Router
pdisk0     Available 10-70-3070-09-P SSA160 Physical Disk Drive
pdisk1     Available 10-70-34D0-12-P SSA160 Physical Disk Drive
hdisk2     Available 10-70-L         SSA Logical Disk Drive
hdisk3     Available 10-70-L         SSA Logical Disk Drive
pdisk8     Available 20-60-34D0-13-P SSA160 Physical Disk Drive
pdisk9     Available 20-60-34D0-15-P SSA160 Physical Disk Drive
hdisk10    Available 20-60-L         SSA Logical Disk Drive
hdisk11    Available 20-60-L         SSA Logical Disk Drive
enclosure0 Available 00-00-3070      SSA Enclosure
enclosure1 Available 00-00-34D0      SSA Enclosure
loglv03    Defined                   Logical volume
lv04       Defined                   Logical volume
loglv04    Defined                   Logical volume
scsi1      Available 20-68           Wide SCSI I/O Controller
rmt0       Available 20-68-00-4,0    Differential SCSI DLT Tape Drive
rmt1       Available 20-68-00-5,0    Differential SCSI DLT Tape Drive
lus        Available                 Legato SCSI User Interface Release

To see the base values for the server in AIX, you can enter the lsattr -El sys0 command.  This is useful for displaying UNIX kernel variables that are used by Oracle such as maxuproc and maxbuf.

root> lsattr -El sys0

keylock     normal     State of system keylock at boot time             
maxbuf      20         Maximum number of pages in block I/O BUFFER CACHE
maxmbuf     0          Maximum Kbytes of real memory allowed for MBUFS  
maxuproc    200        Maximum number of PROCESSES allowed per user     
autorestart false      Automatically REBOOT system after a crash        
iostat      true       Continuously maintain DISK I/O history           
realmem     3137536    Amount of usable physical memory in Kbytes       
conslogin   enable     System Console Login   
fwversion   IBM,L99071 Firmware version and revision levels              
maxpout     0          HIGH water mark for pending write I/Os per file  
minpout     0          LOW water mark for pending write I/Os per file   
fullcore    false      Enable full CORE dump                            
rtasversion 1          Open Firmware RTAS version                       
modelname   IBM,9076-WCN  Machine name                                     
systemid    IBM,010013864 Hardware system identifier       

Oracle Training from Don Burleson 

The best on site "Oracle training classes" are just a phone call away! You can get personalized Oracle training by Donald Burleson, right at your shop!

Oracle training


Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational