Monitoring bandwidth with wireshark
From VbGORE Visual Basic Online RPG Engine
Contents |
Why monitor my bandwidth?
While adding and removing features, it is easy to unintentionally add extremely large packets or even flood your own packets without even realizing it. It is also good to get an estimate on the rough bytes/sec bandwidth you will have with a certain amount of players on so you can get a better idea on what kind of server bandwidth you will be using.
Setting up Wireshark
First off, it is recommended you do this with a public server, so set your server IP public and connect to your server through the client with your external IP. Now, download Wireshark from the Wireshark Download Page and install it. Load the program and click on the 2nd button on the toolbar that should be captioned Show the capture options.... Next to the Capture Filter button, add the following line:
src port 10200 and src host <hostip>
...where <hostip> is your external IP. Now start capturing packets by pressing Start.
Packet meanings
- ACK
- ACK stands for acknowledgment, which is part of the TCP structure. When a packet is sent, the receiver of the packet sends and ACK back to tell that the packet was successfully received.
- PSH
- PSH is for Push, which is a packet that has data attached to it.
- Len
- Displays the amount of data sent in the packet. Just another way to see amount of data sent, but from the Info bar.
- Data
- This is the actual information send from the server. As you notice, in comparison, the data to overall bandwidth usage ratio if very, very bad, which is why we try to send packets as little as possible.
Viewing bandwidth usage
Now for the fun part. To view the bandwidth usage, go to Statistics then Summary. At the bottom, you will see the average bytes / sec and average MBit* / sec.
*Not to be confused with MByte, there are 8 bits in a byte, so to go from MBit to MByte, just divide by 8.