Tuesday, 15 April 2014

To find the exact details about any port on LINUX

We have always faced issues in UNIX flavours regarding the ports which are used in PeopleSoft system like the HTTP port .JSL port,JSH etc etc.
to find out each and every details about any port fire this command:--

lsof -nP -i :1521
PSAPPSRV  26856 psoft    5u  IPv4     262797            TCP > (ESTABLISHED)

on sxecuting the above command on Application server for 1521 port which is the default DB listen port for Oracle. the following output gives detailed information.

COMMAND:-- this the process which is using the port 1521

PID:-- everybody knows whats that :-)

USER:-- which user is running that process.

FD:-- (File Descriptor):-- this is important as it shows the important parameter. Below is the explanation how to interpret the output of FD.

# - The number in front of flag(s) is the file descriptor number of used by the process to associated with the file
u - File open with Read and Write permission
r - File open with Read permission
w - File open with Write permission
W - File open with Write permission and with Write Lock on entire file
mem - Memory mapped file, usually for share library

So 5u will mean that PSAPPSRV has FD 5 associated with read write permission.

TYPE:-- this can be of different  types like FIFO,dir. Here PSAPPSRV is a process having connection to database through .IPV4.

NAME:-- this shows the established connection between the two servers through 1521 port.

No comments:

Post a comment