Sponsored Content
Special Forums IP Networking Get process id and port from the socket Post 302899645 by neutronscott on Wednesday 30th of April 2014 12:28:14 PM
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:
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
SOCKET_GETSOCKNAME(3)							 1						     SOCKET_GETSOCKNAME(3)

socket_getsockname  -  Queries	the local side of the given socket which may either result in host/port or in a Unix filesystem path, dependent on
its type

SYNOPSIS
bool socket_getsockname (resource $socket, string &$addr, [int &$port]) DESCRIPTION
Note socket_getsockname(3) should not be used with AF_UNIX sockets created with socket_connect(3). Only sockets created with socket_accept(3) or a primary server socket following a call to socket_bind(3) will return meaningful values. PARAMETERS
o $socket - A valid socket resource created with socket_create(3) or socket_accept(3). o $addr - If the given socket is of type AF_INET or AF_INET6, socket_getsockname(3) will return the local IP address in appropriate nota- tion (e.g. 127.0.0.1 or fe80::1) in the $address parameter and, if the optional $port parameter is present, also the associated port. If the given socket is of type AF_UNIX, socket_getsockname(3) will return the Unix filesystem path (e.g. /var/run/dae- mon.sock) in the $address parameter. o $port - If provided, this will hold the associated port. RETURN VALUES
Returns TRUE on success or FALSE on failure. socket_getsockname(3) may also return FALSE if the socket type is not any of AF_INET, AF_INET6, or AF_UNIX, in which case the last socket error code is not updated. SEE ALSO
socket_getpeername(3), socket_last_error(3), socket_strerror(3). PHP Documentation Group SOCKET_GETSOCKNAME(3)
All times are GMT -4. The time now is 03:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy