Operating System - HP-UX
1836645 Members
1703 Online
110102 Solutions
New Discussion

Re: Max File opened in HP-UX 11i

 
Jose Javier Sianes Ruiz
Frequent Advisor

Max File opened in HP-UX 11i

¿Is there any command way to know the number of files opened in HP-UX 11i and get the kernel value of max files difined for the system? I want to make a new sensor over some HP-UX 11i machines to control the value and can review when the limit is reached.
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Max File opened in HP-UX 11i

kernel parameters in this area.

maxuprc maxfiles open for a nuser
nfile
maxfiles
maxfiles_lim

Here is an output for a web server(non-database)

maxfiles 2048 - 2048
maxfiles_lim 1024 Y 1024
nfile 4136 - (16*(NPROC+16+MAXUSERS)/10+32+2*(NPTY+NSTRPTY+NSTRTEL))
sendfile_max 0 - 0


All of these parameters can be displayed by running the command kmtune as root.

lsof utility and add in can be used to measure actual number of files open for a process or user.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jose Javier Sianes Ruiz
Frequent Advisor

Re: Max File opened in HP-UX 11i

kmtune is right to get kenel defined parameters, but I need too get the total files opened on an HP-UX in a momment. lsof can do this for me? I must generate a test to prevent problems on machines when the maximum number of files opened is reaching high. Thanks for all.
Ermin Borovac
Honored Contributor

Re: Max File opened in HP-UX 11i

$ sar -v 5 5

will show you current and maximum size of some kernel tables. For open files look for file-sz parameter in the sar output.
Jose Javier Sianes Ruiz
Frequent Advisor

Re: Max File opened in HP-UX 11i

with sar looking in file-sz column there is two values:

3473/12018

3473 is the current opened files? and what is 12018? Looking at mi kernel parameters there isn't anyone with this value:

root@stargate:/root> kmtune -q maxfiles
Parameter Current Dyn Planned Module Version
===============================================================================
maxfiles 8192 - 8192

root@stargate:/root> kmtune -q maxfiles_lim
Parameter Current Dyn Planned Module Version
===============================================================================
maxfiles_lim 2048 Y 2048
Jose Javier Sianes Ruiz
Frequent Advisor

Re: Max File opened in HP-UX 11i

Oh, thats nfile parameter. Excuse me ;) Thanks for all your help.

Jose Javier Sianes Ruiz
Frequent Advisor

Re: Max File opened in HP-UX 11i

I get exactly the answer I need. Thanks for all.