我在排查为什么每次 oracle 进程被终止时我们的服务器都会宕机时遇到了这个问题。我列出了在服务器上运行的 oracle 进程ps aux | grep oracle
,以下是输出:
oracle 21739 0.0 0.0 165068 17488 ? Ssl Oct14 0:18 /apps/11203/grid/bin/mdnsd.bin
oracle 21759 0.1 0.0 176556 25672 ? Ssl Oct14 1:14 /apps/11203/grid/bin/gpnpd.bin
oracle 21772 0.9 0.0 249528 31320 ? Sl Oct14 8:04 /apps/11203/grid/bin/gipcd.bin
oracle 21830 1.1 0.0 265760 115908 ? SLl Oct14 9:54 /apps/11203/grid/bin/ocssd.bin
oracle 21969 0.2 0.0 268648 29148 ? Ssl Oct14 2:10 /apps/11203/grid/bin/evmd.bin
oracle 22246 0.0 0.0 92420 13024 ? S Oct14 0:00 /apps/11203/grid/bin/evmlogger.bin -o /apps/11203/grid/evm/log/evmlogger.info -l /apps/11203/grid/evm/log/evmlogger.log
是的,所有这些进程都在睡眠,从它们的状态代码来看,有不同类型的睡眠 - Ssl, Sl, SLl
。我在谷歌上搜索了不同类型的进程睡眠,但只找到了有关磁盘睡眠、可中断和不可中断睡眠的信息。我没有看到任何关于各种睡眠的子状态的信息Ssl, Sl, SLl
。这里有人知道 SsL、Sl 和 SLl 有什么不同吗?
根据用户“chaos”的评论,我将这些状态确定为:
Ssl - sleeping, is a session loader and multi-threaded.
SL - sleeping, has pages locked into memory
Sl - sleeping, and the process is multi-threaded
那么这些是什么意思呢?处于“SL - 睡眠状态,已将页面锁定到内存中”的进程是否正在使用内存?如果有很多“SL”进程,它们是否会占用其他进程的内存?
(所有这些进程的父进程都是init
,如果这有什么区别的话)。
答案1
这是来自ps
联机帮助页:
进程状态代码:以下是 s、stat 和状态输出说明符(标题“STAT”或“S”)将显示的不同值,用于描述进程的状态:
D uninterruptible sleep (usually IO) R running or runnable (on run queue) S interruptible sleep (waiting for an event to complete) T stopped, either by a job control signal or because it is being traced. W paging (not valid since the 2.6.xx kernel) X dead (should never be seen) Z defunct ("zombie") process, terminated but not reaped by its parent. For BSD formats and when the stat keyword is used, additional characters may be displayed: < high-priority (not nice to other users) N low-priority (nice to other users) L has pages locked into memory (for real-time and custom IO) s is a session leader l is multi-threaded (using CLONE_THREAD, like NPTL pthreads do) + is in the foreground process group.