Solved

How to see which process open socket in Linux(Redhat)

Posted on 2011-02-23
2
913 Views
Last Modified: 2012-05-11
Hi: I have an application which is written by Java and runs on a Linux machine. Redhat is OS. It seems that there is many socket open without being closed. How could I know from OS level which process has opened socket?

0
Comment
Question by:JianJunShen
2 Comments
 
LVL 47

Accepted Solution

by:
for_yan earned 250 total points
ID: 34967859

I guess if your java appliaction running in java  virtual machine keeps open sockets on the system level you'll see it
as belonging to your  java command  - corresponding to the start of the virtual machine

http://www.tech-recipes.com/rx/227/find-out-which-process-is-holding-which-socket-open/
0
 
LVL 92

Assisted Solution

by:objects
objects earned 250 total points
ID: 34967864
you can use lsof or netstat for that
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question