Oracle小工具:sysresv
NinGoo's blog

Oracle小工具:sysresv

从oracle8.1.5起,oracle在unix/linux平台提供了一个叫做sysresv的小工具来查看oracle占用的共享内存段和信号量等系统资源的一些关键信息。


[oracle@localhost ~]$ sysresv
sysresv: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory

出现该错误是由于没有设置LD_LIBRARY_PATH环境变量,导致无法找到需要的库文件

[oracle@localhost ~]$ LD_LIBRARY_PATH=$ORACLE_HOME/lib
[oracle@localhost ~]$ export LD_LIBRARY_PATH
[oracle@localhost ~]$ sysresv

IPC Resources for ORACLE_SID “ning” :
Shared Memory:
ID KEY
458763 0x78b6869c
Semaphores:
ID KEY
98304 0x5ed8a0f0
Oracle Instance alive for sid “ning”


根据上述信息,可以通过ipcs查看sid为ning的instance具体的共享内存段和信号量信息:

—— Shared Memory Segments ——–
key shmid owner perms bytes nattch status
0x78b6869c 458763 oracle 660 243269632 23

—— Semaphore Arrays ——–
key semid owner perms nsems
0x5ed8a0f0 98304 oracle 660 154

—— Message Queues ——–
key msqid owner perms used-bytes messages

sysresv命令比较简单,只有几个不同的option,默认只显示$ORACLE_SID指定的instance的信息:


usage : sysresv [-if] [-d ] [-l sid1 ...]
-i : Prompt before removing ipc resources for each sid
-f : Remove ipc resources silently, oevrrides -i option
-d : List ipc resources for each sid if on
-l sid1 .. : apply sysresv to each sid
Default : sysresv -d on -l $ORACLE_SID
Note : ipc resources will be attempted to be deleted for a
sid only if there is no currently running instance
with that sid.

本文网址:http://www.ningoo.net/html/2007/oracle_utility_sysresv.html

订阅到Google | 收藏到Del.icio.us | 推荐到鲜果

上一篇: 下一篇:
相关文章 随机文章

本文Tags: ,

评论暂缺


(Required)
(Required, will not be published)