list correct number of open files

I would like to be able to monitor the number of open files, as it relates to the rlim_fd_cur and rlim_fd_max kernel parameters. I have an application that is not stable for long periods of time, and the vendor has stated that the number of available file descriptors should be set to unlimited. I have increased rlim_fd_max incrementally to 16384, with no impovement in stability.

To monitor the number of files open for each process, I have tried plimit, pfiles, and lsof. Each gives me a different result. Can somebody give me some clarity as to which output is correct for this case? The purpose is to monitor the number of open files each process has to see if the application is really hitting the rlim_fd_max limit. I am currently under the assumption that rlim_fd_max includes non-filesystem file handles (such as network sockets, etc). Is this a valid assumption?

[892 byte] By [gargand] at [2007-11-25 23:21:37]
# 1
Don't kwno which one to belive, can you check with fuser / plimit / truss ?
NDumeige at 2007-7-5 18:09:16 > top of Java-index,General,Talk to the Sysop...
# 2
Lsof, fuser, plimit, pfiles, and even truss will tell me what this process is opening. I just don't know if the rlim_fd_max limit includes handles for other system resources, like network sockets, shared memory, etc.Dave
gargand at 2007-7-5 18:09:16 > top of Java-index,General,Talk to the Sysop...
# 3
IIRC, non-FS resources come under the "rlim_fd" parameter(s).I used to use a Perl script that would count the number of descriptors used at any one period of time. I'll see if I can find it and post it here. Perhaps that'll help.Dwai.
dwlahiri at 2007-7-5 18:09:16 > top of Java-index,General,Talk to the Sysop...
# 4
That would be great. I'd like to see what facility it uses to gather the data.Thanks,Dave
gargand at 2007-7-5 18:09:16 > top of Java-index,General,Talk to the Sysop...
# 5
I called Sun on this one, and found that everything is included under rlim_fd_max, unix sockets, std file descriptors, pipes, everything. At least I now know what to monitor with LSOF.Dave
gargand at 2007-7-5 18:09:16 > top of Java-index,General,Talk to the Sysop...