Wednesday, August 23, 2017

Find out what process is listening on what port

Do you want to know what process is listening on a particular port in Linux?

Using the lsof command you can confirm that a java process with a pid of 14202 is listening on port 7001:
oracle@soahost1:/home/oracle> lsof -i :7001 | grep LISTEN 
java  14202 oracle 1013u  IPv6 3652361843  0t0  TCP soahost1:afs3-callback (LISTEN)

Similarly, using the netstat command, you can confirm that the java process with a pid of 14202 is listening on port 7001:
oracle@soahost1:/home/oracle> netstat -anp | grep LISTEN | grep 7001
tcp   0  0 ::ffff:10.31.160.230:7001   :::*   LISTEN   14202/java



1 comment:

ttq3zmys65 said...

They tell the machine what moves to execute, one after the other, nicely as|in addition to} controlling other machine capabilities similar to spindle and feed speeds, coolant. The commonest language is G-code or day dreamer baby lounger ISO code, a simple alphanumeric programming language developed for the earliest CNC machines in the 70s. Refers to using of} various software program packages to create toolpaths and NC code to run a CNC managed machine, based mostly on 3D computer mannequin knowledge. When the 2 are used collectively, that is generally referred to as CAD/CAM. A CNC machine produces extremely correct elements directly from a CAD file. In simple phrases, an engineer creates the CAD or CAM file, the file is became a CNC program, and the CNC machine executes the program, creating the half.