Determine number of open files and/or open file locks

  • Follow


Hello.

I'm trying to debug some program running on HP-UX 11i. In the application
log file, I got a lot of these messages:

	*** warning: fork: no more processes - retrying

Well, it seems that something hit a limit here and I'm thinking that
it might be the number of open files (nfile) and/or the number of open
file locks (nflocks).

Is there some way, that I can find out how many open files there are
in the system and how many open file locks there are?

Thanks a lot,

Alexander Skwar
-- 
panic("aha1740.c"); /* Goodbye */
	2.2.16 /usr/src/linux/drivers/scsi/aha1740.c
������������������������������������������������������������������������
0
Reply Alexander 8/12/2004 1:59:39 PM

"Alexander W. Skwar" <from@alexander.skwar.name> writes:

> 	*** warning: fork: no more processes - retrying
> 
> Well, it seems that something hit a limit here and I'm thinking that
> it might be the number of open files (nfile) and/or the number of open
> file locks (nflocks).

Why would you think you are hitting a "number of files" limit when
the error message tells you it's the "number of processes" ?

> Is there some way, that I can find out how many open files there are
> in the system and how many open file locks there are?

Yes: search for 'lsof': list open files

  Lsof revision 4.57 lists information about files opened by
  processes for the following UNIX dialects: [...]
     HP-UX 11.00 and 11.11 [...]

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
0
Reply Paul 8/12/2004 2:44:06 PM


Paul Pluzhnikov wrote:
> "Alexander W. Skwar" <from@alexander.skwar.name> writes:
> 
> 
>>	*** warning: fork: no more processes - retrying
>>
>>Well, it seems that something hit a limit here and I'm thinking that
>>it might be the number of open files (nfile) and/or the number of open
>>file locks (nflocks).
> 
> 
> Why would you think you are hitting a "number of files" limit when
> the error message tells you it's the "number of processes" ?

I'm not at the machine right now, but the number of open processes
(as reported by top) was about 500 while the nproc kernel parameter
is higher.

Also, if this were truly the case, why was the system able to do other
things (like ls, or cron jobs)? If I would have really hit that system
limit, I'd also expect to see messages in the syslog, no?

Alexander Skwar
-- 
Actually, typing random strings in the Finder does the equivalent of
filename completion.
(Discussion in comp.os.linux.misc on the intuitiveness of commands: file
completion vs. the Mac Finder.)
������������������������������������������������������������������������
0
Reply Alexander 8/12/2004 4:39:46 PM

>> Why would you think you are hitting a "number of files" limit when
>> the error message tells you it's the "number of processes" ?

> I'm not at the machine right now, but the number of open processes
> (as reported by top) was about 500 while the nproc kernel parameter
> is higher.

> Also, if this were truly the case, why was the system able to do other
> things (like ls, or cron jobs)? If I would have really hit that system
> limit, I'd also expect to see messages in the syslog, no?

ls could have been a shell built-in I suppose, the cron jobs, who
knows

i believe there was disucssion some time back about a bug that left
zombie zombies around keepin gthe proc table full, so a check of your
patch level against what is available (itrc.hp.com) is probably in
order.

glance can be used in addition to lsof to show open files for a
process and will show various system table values.  I suspect a trial
version might be avaiable for download from software.hp.com.

and while I would have expected a "no memory" sort of error from the
fork() if this were the case - you might also check that you have
sufficient swap space.

rick jones

PS - "11i" in and of itself could refer to at least four releases of
the HP-UX kernel - 11.11 11.20, 11.22 and 11.23 not counting HWE
versions.  So, best to include the uname -r output to uniquely
identify things.

-- 
firebug n, the idiot who tosses a lit cigarette out his car window
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to raj in cup.hp.com  but NOT BOTH...
0
Reply Rick 8/12/2004 5:12:48 PM

Rick Jones wrote:

> ls could have been a shell built-in I suppose, the cron jobs, who
> knows

Yes, you're right.

> i believe there was disucssion some time back about a bug that left
> zombie zombies around keepin gthe proc table full,

top showed no zombie processes

> so a check of your
> patch level against what is available (itrc.hp.com) is probably in
> order.

The Jun '04 (Support Plus 11.11) is installed.

> glance can be used in addition to lsof to show open files for a
> process and will show various system table values.  I suspect a trial
> version might be avaiable for download from software.hp.com.

Yes, I had glance running at that time. It didn't show anything special -
well, I saw that the CPU usage went very high, however system load stayed
low at about 1.28 (system has 4 CPUs).

> and while I would have expected a "no memory" sort of error from the
> fork() if this were the case - you might also check that you have
> sufficient swap space.

I do. 4 GiB. It wasn't even close to be fully used.

> PS - "11i" in and of itself could refer to at least four releases of
> the HP-UX kernel - 11.11 11.20, 11.22 and 11.23 not counting HWE
> versions.  So, best to include the uname -r output to uniquely
> identify things.

Yes, you're right. I'm using 11.11.

Alexander Skwar
-- 
panic("aha1740.c"); /* Goodbye */
	2.2.16 /usr/src/linux/drivers/scsi/aha1740.c
������������������������������������������������������������������������
0
Reply Alexander 8/13/2004 5:51:08 AM

Alexander W. Skwar <from@alexander.skwar.name> wrote:
> Rick Jones wrote:
>> i believe there was disucssion some time back about a bug that left
>> zombie zombies around keepin gthe proc table full,
> top showed no zombie processes

IIRC the "zombie zombie" nature of the bug was that the processes were
not visible at all...  alas, someof my searches aren't helping my dimm
memory.

rick jones
-- 
Wisdom Teeth are impacted, people are affected by the effects of events.
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to raj in cup.hp.com  but NOT BOTH...
0
Reply Rick 8/13/2004 5:10:59 PM

Rick Jones wrote:
> Alexander W. Skwar <from@alexander.skwar.name> wrote:
> 
>>Rick Jones wrote:
>>
>>>i believe there was disucssion some time back about a bug that left
>>>zombie zombies around keepin gthe proc table full,
>>
>>top showed no zombie processes
> 
> 
> IIRC the "zombie zombie" nature of the bug was that the processes were
> not visible at all...

Ah, "zombie zombie" was written on purpose - I thought, that was
a typo, as I had never heard that term before ;) Well, then I'll
have a look for this as well on the net.

Thanks a lot!

Alexander Skwar
-- 
That shot is impossible!  Jack Nicholson himself couldn't make it!

		-- Homer Simpson
		   Scenes from the Class Struggle in Springfield
������������������������������������������������������������������������
0
Reply Alexander 8/14/2004 7:10:03 AM

If you have sar running it can report the nr of open files. Read the man
page to find the right flag for it, I believe it is -r but I am not sure.

Another thing to do is the swapinfo -tam command to look if your swapspace
is too small. Remember for hp-ux the swapspace determines how much memory
you can use.

Paul

"Alexander W. Skwar" <from@alexander.skwar.name> wrote in message
news:411B77CB.6010701@mid.message-center.info...
> Hello.
>
> I'm trying to debug some program running on HP-UX 11i. In the application
> log file, I got a lot of these messages:
>
> *** warning: fork: no more processes - retrying
>
> Well, it seems that something hit a limit here and I'm thinking that
> it might be the number of open files (nfile) and/or the number of open
> file locks (nflocks).
>
> Is there some way, that I can find out how many open files there are
> in the system and how many open file locks there are?
>
> Thanks a lot,
>
> Alexander Skwar
> -- 
> panic("aha1740.c"); /* Goodbye */
> 2.2.16 /usr/src/linux/drivers/scsi/aha1740.c
> ������������������������������������������������������������������������


0
Reply Paul 8/14/2004 8:14:42 AM

> *** warning: fork: no more processes - retrying
check with sar -v
kernel parameters: nproc & maxuprc.


0
Reply nissan350z 8/14/2004 6:22:01 PM

8 Replies
286 Views

(page loaded in 0.079 seconds)

Similiar Articles:













7/24/2012 4:27:34 PM


Reply: