Best way to monitor game traffic?

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
User avatar
Edge100x
Founder
Founder
Posts: 12945
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Best way to monitor game traffic?

Post by Edge100x »

Many tools will read interface statistics from Linux, and it doesn't generate statistics for aliased sub-interfaces. What you'd need to check out usage per IP address is a flow-based tool that can look at layer-3 and higher, or one that looks at processes.

For real-time usage, it looks like nethogs or iftop might be useful. For graph generation, possibly Darkstat.

In terms of how a DDoS would impact other IP addresses on the same VDS, it depends on the attack and how it has to be mitigated. If the attack leverages limitations in the OS, leverages limitations in the application (such as by making it use 100% of all CPU cores), or exceeds the network adapter capacity, that could cause an overall problem. In most cases, the larger attacks are filterable on our end on an IP-specific basis, though, and any potential false-positive from a filter shouldn't cause collateral damage to users of the other IP address(es) assigned to the VDS.
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Best way to monitor game traffic?

Post by Edge100x »

That is what I understood you to mean and what I attempted to address, yes.

In terms of an easy general-purpose package that takes flow-based measurements which can be aggregated into graphs, I don't think there's much out there, and nothing that I have personally experimented with. Darkstat looked promising, but limited.

As with our own internal control panel tools, I would likely build off another piece of software and combine tools to meet my specific needs. Darkstat uses pcap, which is one possibility for getting the raw data, though it's only applicable for relatively low packet rates because of its high overhead (it would probably be fine for individual game servers on a VDS, but not for multiple large Rust servers on a dedicated machine, for instance). I would probably either start with that or look at creating counter-only iptables rules and processing the raw packet and byte counters through another script which exports them to an rrdtool database -- the iptables solution is less general-purpose but it would be sufficient for recording predefined ip/port statistics, and it would have excellent performance.
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Best way to monitor game traffic?

Post by Edge100x »

A home-rolled solution using iptables counters would be a highly effective strategy for what you are looking for. You could count all traffic according to rules that you create, such as based on the server port.

In terms of the bandwidth quantity here, it's extremely rare for a customer to exceed the included usage amount, and more bandwidth is particularly inexpensive when bought up-front (we charge far less for it than we actually pay!). You may be overthinking this :).
User avatar
Edge100x
Founder
Founder
Posts: 12945
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Best way to monitor game traffic?

Post by Edge100x »

APNxRPG24 wrote: Sat Feb 02, 2019 8:58 am Well are there other solutions to view player count? Like seeing how many unique players joined a game server in the past 24 hours or on a certain day. Would that be game specific? How about if it's an srcds server or a SteamCMD game server?
That would be game-specific, yes. You'd need to look for a statistics package, like HLStatsX (or its paid version, gameME).
Post Reply