1833471 Members
2873 Online
110052 Solutions
New Discussion

Number of open files

 
SOLVED
Go to solution
Pepe Jimenez Muñoz
Frequent Advisor

Number of open files

Hi,

I??m running a k260/4 server with HP-UX 10.20, and this morning I have received the following message in the log:

Jan 9 11:25:56 averroes vmunix: : table is full
Jan 9 11:25:56 averroes vmunix: file: table is full

This is due to the nfile kernel parameter has been reached, OK.

Last week, I saw the "sar" data and this parameter never has had a value greater than 4000, and the top is 8990.

Today this parameter has overflow his capacity, and I don??t now why!!!

sar -v 2 3

HP-UX averroes B.10.20 U 9000/800 01/09/02

13:13:18 text-sz ov proc-sz ov inod-sz ov file-sz ov
13:13:20 N/A N/A 1372/1733 0 14655/15912 0 7422/8990 0
13:13:22 N/A N/A 1372/1733 0 14653/15912 0 7424/8990 0
13:13:24 N/A N/A 1374/1733 0 14643/15912 0 7430/8990 0


Somebody can tell me:

What has happened and how can I know why ?

Which is the command to see the files that an user has opened?

Thanks
ppviso
7 REPLIES 7
nancy rippey
Trusted Contributor

Re: Number of open files

Pepe,
If you have lsof loaded you try using it. LSOF (list open files). It can be downloaded from
http://hpux.cs.utah.edu/

nancy
nrip
Steven Sim Kok Leong
Honored Contributor

Re: Number of open files

Hi,

Use lsof the utility to list open files. You can get lsof from the HP porting and archive centre at http://hpux.cae.wisc.edu/.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Robin Wakefield
Honored Contributor

Re: Number of open files

Hi,

If you download "lsof" from somewhere like:

http://hpux.connect.org.uk/

then run:

lsof -u username

Rgds, Robin.
John Palmer
Honored Contributor

Re: Number of open files

You may have a 'rogue' process that has opened lots of files.

If you have glance, it will list files that a process has open. Select the process with the 's' command then use 'F'.

Regards,
John
harry d brown jr
Honored Contributor

Re: Number of open files

Here's a full path for "lsof":

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.55/

Do you run NFS on this server?

live free or die
harry
Live Free or Die
James R. Ferguson
Acclaimed Contributor
Solution

Re: Number of open files

Hi:

I agree with John. A rogue process is one possible reason. The kernel parameters 'maxfiles' and 'maxfiles_lim' are the "soft" and "hard" boundries for the number of open files a process can have and are ultimately constrained by 'nfile'. You might want to evaluate these values. You can see their values with SAM or with 'kmtune -q ' on 11.x or with 'sysdef' on 10.x.

Another possible reason for a large number of open files might be users who establish telnet or CDE sessions but disconnect ungracefully leaving orphaned sessions inherited by 'init'.
You could (carefully) look for these with 'ps -ef'.

For more information on the kernel parameters I mentioned above, see:

http://docs.hp.com/hpux/onlinedocs/os/KCparams.OverviewAll.html

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: Number of open files

From sar -v:

13:13:18 text-sz ov proc-sz ov inod-sz ov file-sz ov
13:13:20 N/A N/A 1372/1733 0 14655/15912 0 7422/8990 0

It apears that all 3 parameters need significant changes. Start with ninode. If you have a lot of HFS filesystems (see /etc/fstab), then this is probably OK, otherwise, it should be reduced to 1000-2000. Otherwise, it just wastes space in RAM.

nproc is almost full so it should ber doubled or tripled if this system is going to grow even more. nfile is also very close to full so it should be doubled or tripled.

There is no single user causing the problem. The reason is that there are 7,422 files used by 1,372 processes, or just over 5 files per process, a perfectly normal value. The real question is then: is it normal to have 1,372 processes running at the same time?

Start by sorting processes by user:

ps -ef | sort > /tmp/ps.user

to see just the non-root proceses:

ps -ef | grep -v " root " | sort > /tmp/ps.user

or to see just the intersting information:

UNIX95= ps -e -o ruser,pid,vsz,args | grep -v " root " | sort > /tmp/ps.user


Bill Hassell, sysadmin