Remove that last line if you don't need it.Įcho Timestamp%TAB%Down bytes%TAB%Up bytes%TAB%Down speed%TAB%Up speed If your upload or download speed is up to 100 MBytes per seconds, you need to repeat the loop more often (for example every 1 second). ![]() The following batch file uses the 4th string line, that's the 1st adapter listed. Remember you need to run netsh interface ip show subinterfaces and check what is the line of your network adapter. I'm updating the answer for a more complete an accurate one, using netsh command, and some string operations to avoid Windows 32bits integer overflow. In order to obtain traffic rates, you've got to timestamp your calls to those commands and do the computation yourself.ĪFAIK, both commands are shipped with all recent MS Windows versions. Note that, as ifconfig do, net or netstat only report amount of data since the interface has been brought up. 'net statistics ' or 'netstat ' are, as far as network traffic statistics are concerned, the MS Windows equivalents of Linux 'ifconfig' (or 'cat /proc/net/dev' if you prefer). ![]() So, according to your needs, you might be interested in the MS Windows net or netstat commands ( netstat has option to report statistics by protocol). Moreover, as tshark makes packets capturing, there is some overhead. ![]() As such, it is only good at reporting "instant" statistics but not to report poll traffic at regular points in time to have a view of how your network traffic changes along the day, week. ), it has the main drawback to gather statistics during the time period it is running. ![]() While tshark is really powerful if you want to have fine grained statistics (according to hosts, protocols.
0 Comments
Leave a Reply. |