RE: How can I find number of 'open files'

2001-08-17 Thread Martin van den Bemt

There is a profiler available for the jdk which spits out a nice overview of
all the instances of classes that are used.. Maby that can help you check
the correctnes of the code and see the bottlenecks (it also says how much
memory it uses..).. Just saw a report on that one day, so you have to check
java.sun.com for more details..

Mvgr,
martin

 -Original Message-
 From: Ivan Markovic [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 17, 2001 5:39 AM
 To: [EMAIL PROTECTED]
 Subject: How can I find number of 'open files'
 Importance: High


 I had a problem a while back with 'too many open files'. So I checked
 and fix some bugs in my code and increased the limit (Solaris running
 on Sun Netra T1).  But now the problem is back. I suspect it is a
 problem with my code.

 How can I find out how many files are 'open'? If I can track that
 number then I can hit my code through Tomcat and see roughly when the
 files are not being closed. Is there some Unix function that will
 allow me to monitor open files?

 Below is the kind of error that I see thank you.

 java.net.SocketException: Too many open files
  at java.net.PlainSocketImpl.socketAccept(Native Method)
  at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:421)
  at java.net.ServerSocket.implAccept(ServerSocket.java:243)
  at java.net.ServerSocket.accept(ServerSocket.java:222)
  at
 org.apache.tomcat.service.PoolTcpEndpoint.acceptSocket(PoolTcpEndp
 oint.java:277)
  at
 org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:344)
  at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411)
  at java.lang.Thread.run(Thread.java:484)
 Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8007]
 shutdown due to exception: java.net.SocketException: Too many open
 files

 --
 Ivan Markovic
 SculptLight
 http://www.sculptlight.com
 (+353) 87 2939256
 (+353) 1 2982205

 114 Lower Churchtown Rd,
 Dublin 14,
 Ireland.





Re: How can I find number of 'open files'

2001-08-17 Thread Pier P. Fumagalli

Ivan Markovic at [EMAIL PROTECTED] wrote:

 I had a problem a while back with 'too many open files'. So I checked
 and fix some bugs in my code and increased the limit (Solaris running
 on Sun Netra T1).  But now the problem is back. I suspect it is a
 problem with my code.
 
 How can I find out how many files are 'open'? If I can track that
 number then I can hit my code through Tomcat and see roughly when the
 files are not being closed. Is there some Unix function that will
 allow me to monitor open files?

Just a curiosity... What Tomcat version are you using?

Pier




How can I find number of 'open files'

2001-08-16 Thread Ivan Markovic

I had a problem a while back with 'too many open files'. So I checked 
and fix some bugs in my code and increased the limit (Solaris running 
on Sun Netra T1).  But now the problem is back. I suspect it is a 
problem with my code.

How can I find out how many files are 'open'? If I can track that 
number then I can hit my code through Tomcat and see roughly when the 
files are not being closed. Is there some Unix function that will 
allow me to monitor open files?

Below is the kind of error that I see thank you.

java.net.SocketException: Too many open files
 at java.net.PlainSocketImpl.socketAccept(Native Method)
 at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:421)
 at java.net.ServerSocket.implAccept(ServerSocket.java:243)
 at java.net.ServerSocket.accept(ServerSocket.java:222)
 at 
org.apache.tomcat.service.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:277)
 at 
org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:344)
 at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411)
 at java.lang.Thread.run(Thread.java:484)
Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8007] 
shutdown due to exception: java.net.SocketException: Too many open 
files

-- 
Ivan Markovic
SculptLight
http://www.sculptlight.com
(+353) 87 2939256
(+353) 1 2982205

114 Lower Churchtown Rd,
Dublin 14,
Ireland.



RE: How can I find number of 'open files'

2001-08-16 Thread Artigas, Ricardo Y.

I assume you are closing the sockets that you create/open?

:~)
Ricky Y. Artigas
Analyst/Programmer /
Database Administrator
Information Technology Division
Easycall Communications Phils., Inc.
 ---
 IMPORTANT NOTICE: 
  
 This message (and any attachment hereto) may contain privileged and/or
 confidential information specific to EasyCall. If you are not the intended
 addressee indicated in this message, you may not copy or disseminate this
 message (or any attachment hereto) to anyone. Instead, please destroy this
 message (and any attachment hereto), and kindly notify the sender by reply
 email. Any information in this message (and any attachment thereto) that
 do not relate to the official business of EasyCall shall be understood as
 neither given nor endorsed by the company.
 
 
 -Original Message-
 From: Ivan Markovic [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, August 17, 2001 11:39 AM
 To:   [EMAIL PROTECTED]
 Subject:  How can I find number of 'open files'
 Importance:   High
 
 I had a problem a while back with 'too many open files'. So I checked 
 and fix some bugs in my code and increased the limit (Solaris running 
 on Sun Netra T1).  But now the problem is back. I suspect it is a 
 problem with my code.
 
 How can I find out how many files are 'open'? If I can track that 
 number then I can hit my code through Tomcat and see roughly when the 
 files are not being closed. Is there some Unix function that will 
 allow me to monitor open files?
 
 Below is the kind of error that I see thank you.
 
 java.net.SocketException: Too many open files
  at java.net.PlainSocketImpl.socketAccept(Native Method)
  at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:421)
  at java.net.ServerSocket.implAccept(ServerSocket.java:243)
  at java.net.ServerSocket.accept(ServerSocket.java:222)
  at 
 org.apache.tomcat.service.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.jav
 a:277)
  at 
 org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:344)
  at 
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411)
  at java.lang.Thread.run(Thread.java:484)
 Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8007] 
 shutdown due to exception: java.net.SocketException: Too many open 
 files
 
 -- 
 Ivan Markovic
 SculptLight
 http://www.sculptlight.com
 (+353) 87 2939256
 (+353) 1 2982205
 
 114 Lower Churchtown Rd,
 Dublin 14,
 Ireland.



Re: How can I find number of 'open files'

2001-08-16 Thread Cyril Bouteille

Ivan,

 How can I find out how many files are 'open'? If I can track that
 number then I can hit my code through Tomcat and see roughly when the
 files are not being closed. Is there some Unix function that will
 allow me to monitor open files?

You can try /usr/proc/bin/pfiles with the pid of tomcat. It'll report
fstat and fcntl information for all open files in the process.

Regards,

begin:vcard 
n:Bouteille;Cyril
tel;home:(510) 727-1707
x-mozilla-html:FALSE
adr:;;22702 Peak St;Hayward;CA;94541;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Software Architect
fn:Cyril Bouteille
end:vcard

 S/MIME Cryptographic Signature


Re: How can I find number of 'open files'

2001-08-16 Thread Cyril Bouteille

Ivan,

 How can I find out how many files are 'open'? If I can track that
 number then I can hit my code through Tomcat and see roughly when the
 files are not being closed. Is there some Unix function that will
 allow me to monitor open files?

You can try /usr/proc/bin/pfiles with the pid of tomcat. It'll report
fstat and fcntl information for all open files in the process.

Regards,



Re: How can I find number of 'open files'

2001-08-16 Thread Nikola Milutinovic

 I had a problem a while back with 'too many open files'. So I checked 
 and fix some bugs in my code and increased the limit (Solaris running 
 on Sun Netra T1).  But now the problem is back. I suspect it is a 
 problem with my code.
 
 How can I find out how many files are 'open'? If I can track that 
 number then I can hit my code through Tomcat and see roughly when the 
 files are not being closed. Is there some Unix function that will 
 allow me to monitor open files?

lsof - the most famous utlity for inspecting: processes (like ps), open files and 
network connections (like netstat).

Nix.

P.S. kako je u Dablinu?