1761384 Members
2805 Online
108901 Solutions
New Discussion юеВ

File table full

 
SOLVED
Go to solution
Leslie Chaim
Regular Advisor

File table full

Is there a comand which checks all currently open files and processes associated with them?

Thanks for your help,
Leslie
If life serves you lemons, make lemonade
8 REPLIES 8
Craig Rants
Honored Contributor

Re: File table full

You can you glance to find open files associated with a process, I believe it is the g option.

Also you could use lsof, you would need to get that from the hp porting site.

Good Luck,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Anthony deRito
Respected Contributor

Re: File table full

A search would have been very helpful to you here. Most will reply with lsof. Its a must have for this type of thing.

Tony
Sanjay_6
Honored Contributor

Re: File table full

Hi Leslie,

you can use glanceplus for that.

You can also use "lsof". Here is the "lsof" faq,

ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/FAQ

and you can get it from this site,

http://www-rcd.cc.purdue.edu/~abe/

Hope this helps.

Regds
Patrick Wallek
Honored Contributor
Solution

Re: File table full

The easiest way to fix the above error message is to increase the NFILE kernel parameter, though that does require a reboot to take effect.

If you want to see what files are open by which processes, the best bet is to download and install lsof.

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.55/
Craig Rants
Honored Contributor

Re: File table full

Man I can't even write a complete sentence.

I meant to say, you can use glance, not you can glance.

C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Sanjay_6
Honored Contributor

Re: File table full

Hi Leslie,

To fix the file table full message by tuning the "nfile" kernel parameter. Here is a thread on "nfile"

http://docs.hp.com//hpux/onlinedocs/os/11i/kcparams/KCparam.Nfile.html

Here is the complete list of kernel parameters,

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

Hope this helps.

Regds
Leslie Chaim
Regular Advisor

Re: File table full

Thanks for all your help 'lsof' should do the trick.

BTW, with glance I can see open file(s) per process, and this has to be done by checking the system table for each and every process. When I get a 'File table full' message, I need to be able to quickly see which process has the most open files.

The nfile param is at 6000, and I'm not ready yet to reboot:)

Cheers,
Leslie
If life serves you lemons, make lemonade
Bill Hassell
Honored Contributor

Re: File table full

What do you have kernel parameter maxfiles set to? If it is larger than a few dozen, you may have bad user processes running away, trying to open hundreds of files at one time.

Now this may be by design (although sysadmins will question the sanity of a program that tries to open 1,000 fioles at the same time) in which case, nfile may have to be set to 20,000 or even 50,000 if many copies of the program mustrun at the same time.

maxfiles is a per-process limit and can be overridden programatically using setrlimit, or prior to running a specific process (for example in a script) by using the ulimit command (POSIX shell).

If you have thousands of processes running (and the majority are normal and necessary) then a nuber of kernel parameters will have to be *significantly* increased, perhaps 5x to 10x larger.


Bill Hassell, sysadmin