If you are connected to a network or Internet and you want to see which services are connected to your system then you can find that out with a simple DOS command.
To find out who is connected to your PC, go to Start –> Run –> cmd. This will open up the DOS command prompt.
Type “netstat -a” in the
command prompt and you’ll see all the connections on your system that are active at this time.
See which process is involved in the connection
NETSTAT comes with a lot of options. One of them is that you can see the executable which is involved in each connection. You can type the following command to see the executables along with the connections.
If you want that the netstat results be refreshed automatically at specific intervals and you don’t have to type in the command again and again, you can use the following command option:
Where interval is any no. of seconds. For example if you want the results to be refreshed after every 5 seconds, then here is the command for it:
Saving the output results
If you want to have a log of your active connections, then you can use the following command:
C:\>netstat -b 1 > “connections.txt”
This command will save the results of netstat after every one second. And if you want to quit saving the results, go to the cmd prompt where the command is running, press Ctrl+C to stop the command. The file connections.txt will be saved in the directory where you currently are. For example in my example case above, it will be saved in C:\.