How to Use NETSTAT to Locate TCP Socket Connections

How to Use NETSTAT to Locate TCP Socket Connections

Overview

Locating an application that is using a TCP Socket is vital to troubleshooting a conflict. NETSTAT is a built in Windows tool. 

Requirements

  1. Local Administrator Rights
  2. Experience with Command Prompt

Using NETSTAT

  1. Open an elevated Command Prompt
  2. Run the following command: netstat -ano | find "[socketnumber]"

    1. The above example shows PID 1952 is listening on TCP socket 1024
  3. This will return the process ID (PID) of the application using the TCP socket
  4. Run the following command: tasklist | find "[pid]"

    1. The above example shows PID 1952 is PDNC.exe
  5. In conclusion, we now know TCP Socket 1024 is being used by PDNC.exe

More Information


    • Related Articles

    • How to Use Okuma SCOUT to Determine MTConnect Version & Compatibility

      Overview This guide will take you through the steps to see if your P series Okuma CNC is compatible with MTConnect Requirements Setup a free Okuma Account (found at www.myokuma.com) SCOUT app (found at www.myokuma.com) USB Flash Drive Optional: USB ...
    • Troubleshooting a SQL Server Connection

      Overview If you are unable to connect to a SQL database, you can perform what's called a UDL test which uses a built-in SQL Server OLE DB provider to test SQL connections. This is done independent of any software application and is a great ...
    • Firewall Exceptions for SQL Server

      Overview SQL Server uses both TCP and UDP ports for communication. It is necessary to allow these ports through the firewall. TCP Incoming Ports 1433 4022 135 1434 UDP Incoming Ports 1434
    • How to License eXtremeDNC

      Overview The following article explains how to license eXtremeDNC.  Requirements Local Administrator Rights Activation Code 1 Activation Code 2 Licensing changing Locate the shortcut to launch your eXtremeDNC application While holding Shift, right ...
    • Why are most Okuma MTConnect tags UNAVAILABLE

      Problem The MTConnect Agent on the Okuma control appears to be working, but most tags are UNAVAILABLE Reason Upon installation of the MTConnect Adapter, the Enable Monitoring Tags checkbox was not checked Solution Open the MTConnect Adapter, go to ...