Check when players are on private server, UdpInDatagrams vs UdpOutDatagrams vs both? #681
-
I'm trying to write something to tell me when friends are on/off my server, and your server check code here helped me understand why A2S wasn't working, thanks! Out of curiosity though, why are you only checking UdpInDatagrams, and not both? (On this line) Something like this should give you both: list_udp_packets=$(nstat --zeros | awk '/Udp(In|Out)Datagrams/{print $2}' | paste -sd+)
# Variable in form of "InNumber+OutNumber" literally, i.e "5+7". Add them:
num_udp_packets=$(( $list_udp_packets )) Is 'Out' just too noisy maybe? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
After playing around with watchdogs for a couple other games, I've realized that yes When you're looking at traffic to see if people are connected, checking what just goes in is a lot more stable. You might trip on if the container is downloading something, but you probably don't want to kill then anyways since it's likely an update. |
Beta Was this translation helpful? Give feedback.
After playing around with watchdogs for a couple other games, I've realized that yes
out
can be VERY noisy. For example, Minecraft can send out telemetry to Microsoft and that'd be added to the "packet count". That has no meaning on if people are connected or not.When you're looking at traffic to see if people are connected, checking what just goes in is a lot more stable. You might trip on if the container is downloading something, but you probably don't want to kill then anyways since it's likely an update.