Wednesday, October 16, 2013

netstat command

netstat is a very helpful command for networking debug and for other purposes.
For Windows environment, the following netstat command is a frequent usage to me:
netstat -n -o -10
And here is output

To know more about netstat options
netstat /help

For Linux,
netstat -vatn (for tcp)


netstat -vaun (for udp)

To display in time interval like in Windows (netstat -n -o -t 10), use these
netstat -c
netstat -vatn -c

For Linux, the time interval is fixed (-c option is every second), but in Windows the time interval can be set as needed. In this example, I set every 10s.


1 comment:

  1. You are right. But on linux have watch command to set time interval so can use along with netstat to set time intervals. On linux, netstat have lots of options basic and advance netstat command examples posted on linoxide.

    ReplyDelete