Get process id and port from the socket


 
Thread Tools Search this Thread
Special Forums IP Networking Get process id and port from the socket
# 1  
Old 04-30-2014
Get process id and port from the socket

Hello,

Please help me in getting the process id and the port number from the socket


Code:
 netstat -Aan|grep -i closed
f100050010b133b8 tcp        0      0  *.*                   *.*                   CLOSED
f1000500119b53b8 tcp4       0      0  *.*                   *.*                   CLOSED



Best regards,
Vishal
# 2  
Old 04-30-2014
Linux netstat does this with the -p option to netstat

---------- Post updated at 11:41 AM ---------- Previous update was at 11:40 AM ----------

well, actually looking at this output i'm guessing it isn't Linux. So please tell us your OS
# 3  
Old 04-30-2014
Hi,


This is AIX.


Best regards,
Vishal
# 4  
Old 04-30-2014
Does this post properly answer the question?
How to find what process is using a port in AIX 5L and above
This User Gave Thanks to neutronscott For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Process on a specified Terminal and Socket Port does not start

Hi, I new to AIX, and I have been using Rocket UniData in it. I had to set up a Process for Data Exchange by assigning a unique Terminal and a Socket Port to that process. I ran the process for the first time and it was successful and after use I stopped the process. Now when I want to run it... (3 Replies)
Discussion started by: BejoyS
3 Replies

2. IP Networking

Tcp ip port open but no such process (merged: Release A Port)

i want to kill a tcp connection by killing its pid with netstat -an i got the tcp ip connection on port 5914 but when i type ps -a or ps-e there is not such process running on port 5914 is it possible that because i do not log on with proper user account i can not see that process running? (30 Replies)
Discussion started by: alinamadchian
30 Replies

3. Solaris

How to clear network socket port 17005?

:)Hi Solaris Experts, I am wondering whether it is possible to clear a network socket port 17005 left by Apache Tomcat/6.0.20 after having to terminate it forcefully, since it has run away due to remote JDBC resource contention on another server. A normal Tomcat stop / shutdown proves... (2 Replies)
Discussion started by: gjackson123
2 Replies

4. Programming

Using socket to test a TCP port

Hello, I'm trying to write a small c application to test a tcp port. This works fine for the most part but the default timeout on the connect is very long. I have been reading many posts but and it looks like I need to set the socket to be non-blocking and poll for a result. I have been totally... (2 Replies)
Discussion started by: tjones1105
2 Replies

5. IP Networking

Port number of socket returned by accept()

Hi, I typed a few tcp/ip client/server examples from a book and it works - sort of - but I noticed something strange. When I run my server I set it to use port 3001 and the client uses the same port to connect to server. They succeed, but the server prints something that doesn't really make much... (0 Replies)
Discussion started by: idelovski
0 Replies

6. UNIX for Dummies Questions & Answers

permission to bind a socket to port 843?

I have written a flash socket security file server in PHP. The basic idea is that when Flash Player connects via socket to a server, the first thing it does is connect to port 843 and send a request for a 'socket policy file' by sending the string <policy-file-request/>. The problem I have is... (5 Replies)
Discussion started by: sneakyimp
5 Replies

7. Programming

Cloning a socket connection, using other port numbers

Hello everybody, I've coded a multi-client server based on internet sockets using the scheme listen on port X-accept-fork, exactly like beej's guide At some point I would like to establish a secondary connection between a client and the server-child serving him. I was considering the... (4 Replies)
Discussion started by: jonas.gabriel
4 Replies

8. UNIX for Dummies Questions & Answers

Socket programming:One server two port

I want my server socket to listen on two ports in my machine. How do i achieve it? I will have two clients one connecting to 1 port and another to a different port. So my server needs to listen to both. Thanks. (1 Reply)
Discussion started by: abc.working
1 Replies

9. Programming

[Problem]Reuse port in BSD socket

I write a chat server using BSD socket, which is listen to an specific port, say 1212. After the chat server is shutdown, I want to execute the program again. But kernel will say that the port 1212 is now unavailable. I have to wait for a while to reuse the port 1212. I am sure there's no... (1 Reply)
Discussion started by: Namely
1 Replies

10. Programming

socket on serial port

Does anyone know if it's possible to send socket by a serial port ? If yes, how can I find on Irix the value of my serial ports to use with this function : serverSockAddr.sin_port = ? Thanks for all responses ! Kintoo (2 Replies)
Discussion started by: kintoo
2 Replies
Login or Register to Ask a Question