1. Following will show the number of user processes per user

ps hax -o user | sort | uniq -c
                 
Example:

[oracle@machine-1 ~]$ ps hax -o user | sort | uniq -c
      1 dbus
     46 oracle
      2 postfix
    122 root
      1 rpc
      1 rpcuser
[oracle@machine-1 ~]$

 

2. Following will show number of threads or LWPs for all users

 ps -eLf

3. Following will show number of threads or LWPs for a particular user

 ps -Lf -U oracle | wc -l


OR

Run top, SHIFT + H, Look at the number of tasks

4. Setting Shell Limits for the Oracle User

$ su - oracle
$ ulimit -n
1024
$
Check this Article from Red Hat ->
Setting Shell Limits for the Oracle User

5. Dealing with –  fork: retry: Resource temporarily unavailable

Error: fork: retry: Resource temporarily unavailable

Update nproc for the user,
/etc/security/limits.conf


#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4
oracle          soft    nofile          65536
oracle          hard    nofile          65536
oracle          soft    nproc           65536
oracle          hard    nproc           65536

# End of file
[oracle@machine-1 ~]$ cat /etc/security/limits.conf
-rw-r--r-- 1 root root 2009 Jun 10  2013 /etc/security/limits.conf

Please note, machine restart is not needed for this change.