Friday, August 31, 2012

How to monitor the number of network connections on a server.


I am troubleshooting a server problem and want to monitor the number of network connections. You need wc (wordcount) for Windows. The choice command gives me a three second delay.

Here is my script.

echo off
:loop
netstat -an | wc
choice /n /d n /t 3 >nul
goto loop

Here is the output. The first column should be the number of network connections on my server.


    234     903   15101
    296    1151   19199
    391    1531   25465
    494    1943   32271
    469    1843   30617
    391    1531   25465
    391    1531   25465
    545    2147   35629
    545    2147   35629


No comments: