TASKLIST.EXE is used to know
the list of processes with its owing id. When we run >tasklist in command
window we see the following output.
Suppose, we want to know which
port is used by skype? After running >>tasklist you will see the above
output. Here you will see Image Name: Skype.exe with process id or PID: 3224.
Now if you want to know which process owes process id or PID 3224? Just run
>>tasklist /FI “PID eq 3224”. You will see the following output.
NETSTAT.EXE is used to
identify what ports are being used by a particular process. The syntax that we
will be using for NETSTAT.EXE is as follows: netstat.exe –a –n –o. Here,
- -a: listing of all connections and listening ports
- -n: display address and port numbers in numerical form
- -o: display the owning PID associated with each connection
Now after running >netstat –a –n –o , you will see the
following screen.
If you look at the output, you
will see that local address of PID 3224 is 0.0.0.0:55956 which mean process id
3224 used port 55956. You already know that 3224 is the PID of process Skype.exe.
So, you came to know that process skype.exe is used port 55956.
Very nice post....... Useful and informative..
ReplyDeleteThis comment has been removed by the author.
ReplyDelete