user3207859
user3207859

Reputation: 31

How to understand output of netstat( below ) command?

C:\Users\IBM_ADMIN>netstat -nao | findstr 27000

  TCP    0.0.0.0:27000          0.0.0.0:0              LISTENING       4848
  TCP    127.0.0.1:18107        127.0.0.1:27000        ESTABLISHED     1168
  TCP    127.0.0.1:27000        127.0.0.1:18107        ESTABLISHED     4848
  TCP    [::]:27000             [::]:0                 LISTENING       4848
  TCP    [fe80::b174:a291:3c63:8e7f%14]:18104  [fe80::b174:a291:3c63:8e7f%14]:27000  TIME_WAIT       

0

Upvotes: 3

Views: 15204

Answers (1)

Ken White
Ken White

Reputation: 125749

From your comments to your question above:

I mean what can I conclude from port 4848 and 1168 ? Is the service listening on port 27000 or is it on 4868 or 1168 ?

You can conclude that you're not reading the column headers for the output. The column containing the 4848 and 1168 is headed PID, which is Process ID. It has nothing to do with the port.

The columns are (in order, left to right - I've added the headings to your output):

Proto  Local Address          Foreign Address        State           PID 
TCP    0.0.0.0:27000          0.0.0.0:0              LISTENING       4848
TCP    127.0.0.1:18107        127.0.0.1:27000        ESTABLISHED     1168
TCP    127.0.0.1:27000        127.0.0.1:18107        ESTABLISHED     4848
TCP    [::]:27000             [::]:0                 LISTENING       4848
TCP    [fe80::b174:a291:3c63:8e7f%14]:18104  [fe80::b174:a291:3c63:8e7f%14]:27000  TIME_WAIT       

Upvotes: 1

Related Questions