Quantcast
Channel: Ludovico – DBA survival BLOG
Viewing all articles
Browse latest Browse all 119

Check the actual ulimits for all the running Oracle instances

$
0
0

I’ve read the recent good post from my friend Rene on Pythian’s Blog about how to troubleshoot when user ulimits are different from what specified in limits.conf:

Quick Tip : Oracle User Ulimit Doesn’t Reflect Value on /etc/security/limits.conf

I would like to add my 2 cents:

Once you fix the problem, you may want to check (any maybe monitor) when an instance is running with a wrong value (and maybe encounter the famous Error message: Linux-x86_64 Error: 23: Too many open files in system).

for pmonspid in `ps -eaf | grep [p]mon | awk '{print $2}'` ; do ps -f -p $pmonspid  ; grep "open files" /proc/$pmonspid/limits ; done

This single line gives you an overview of all your instances at once:

$ for pmonspid in `ps -eaf | grep [p]mon | awk '{print $2}'` ; do ps -f -p $pmonspid  ; grep "open files" /proc/$pmonspid/limits ; done
UID        PID  PPID  C STIME TTY     TIME CMD           
oracle     545     1  0 Mar18 ?   00:08:27 ora_pmon_orcl1
Max open files            1024            1024           files <<< 1024!!
UID        PID  PPID  C STIME TTY     TIME CMD           
oracle    1294     1  0 Apr20 ?   00:00:09 ora_pmon_orcl2
Max open files            1024            1024           files <<< 1024!!
UID        PID  PPID  C STIME TTY     TIME CMD           
oracle    9917     1  0 Jan26 ?   00:08:17 ora_pmon_orcl3
Max open files            1024            1024           files <<< 1024!!
UID        PID  PPID  C STIME TTY     TIME CMD           
oracle   11286     1  0 Jan26 ?   00:07:35 ora_pmon_orcl4
Max open files            1024            1024           files <<< 1024!!
UID        PID  PPID  C STIME TTY     TIME CMD           
oracle   11647     1  0 Mar04 ?   00:04:36 ora_pmon_orcl5
Max open files            65536           65536          files
UID        PID  PPID  C STIME TTY     TIME CMD           
oracle   11836     1  0 Jan26 ?   00:07:55 ora_pmon_orcl6
Max open files            1024            1024           files <<< 1024!!
UID        PID  PPID  C STIME TTY     TIME CMD           
oracle   14183     1  0 Feb06 ?   00:07:13 ora_pmon_orcl7
Max open files            65536           65536          files
UID        PID  PPID  C STIME TTY     TIME CMD           
oracle   16023     1  0 Feb27 ?   00:05:20 ora_pmon_orcl8
Max open files            65536           65536          files
UID        PID  PPID  C STIME TTY     TIME CMD           
oracle   18756     1  0 Mar20 ?   00:03:24 ora_pmon_orcl9
Max open files            65536           65536          files

If you find any wrong values, plan a restart before you encounter any error during peak hours!

Ludo

 

 


Viewing all articles
Browse latest Browse all 119

Trending Articles