You need to play with lsof; lsof -i 4 -n -a -p $GAMESERVPID
"netstat -anp" can also be helpful.
http://danielmiessler.com/study/lsof/
Check out the -strictportbind flag, which will prevent a server from
starting if it's ports are already in use. Be wary that auto-restart in
the startup script will make the server restart constantly unless you
explicitly turn it off or don't use their script.
Note how -steamport will use whatever you assign +1, no matter what.
It's been like this forever.
Example output from an actual server
Process command arguments:
./srcds_linux -game cstrike -ip x.x.x.x +clientport 27019 +hostport
27119 +tv_port 27219 -steamport 26019 +replay_port 27419 -strictportbind
-pidfile /home/hlds/srcds-servers/server-css-ALPHA/server.pid
-maxplayers 24 +map cs_office
lsof says the following network sockets are in use by PID 12778:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
srcds_lin 12778 hlds 6u IPv4 3628443473 0t0 UDP x.x.x.x:27119
srcds_lin 12778 hlds 7u IPv4 3628443474 0t0 UDP x.x.x.x:27019
srcds_lin 12778 hlds 8u IPv4 3628443475 0t0 UDP x.x.x.x:27219
srcds_lin 12778 hlds 9u IPv4 3628443476 0t0 TCP x.x.x.x:27119
(LISTEN)
srcds_lin 12778 hlds 24u IPv4 3628443525 0t0 UDP x.x.x.x:26020
Christoffer Pedersen wrote:
Hi there,
I have some questions regarding to the SRCDS port assignments. In the "early
days" SRCDS used to only assign it's ports to the gameserverport itself
(TCP&UDP) and the SourceTV port (if this is enabled).
I am currently running into some issues. Some of my running gameservers are
taking up eachother's ports somehow, which they actually shouldn't cause I
have manually set the STV port and the gameserverport itself in an order so
there would be no conflicts. This happened after the big CS:S refresh some
weeks ago.. Here's an output from a server that starts up on the correct
port:
Assigned port is 27039
WARNING: Port 27005 was unavailable - bound to port 27009 instead<- Why
does it want to use port 27009?
Network: IP 10.230.1.10, mode MP, dedicated Yes, ports 27018 SV / 27009 CL
And here's an output from a server that starts up on another port than it
was assigned:
WARNING: Port 27015 was unavailable - bound to port 27037 instead
WARNING: UDP_OpenSocket: unable to bind socket
Network: IP 10.230.1.10, mode MP, dedicated Yes, ports 27037 SV / -1 CL
I am suspecting that it's trying to bind it's hostport, but how can I
edit/disable this?
Thanks,
Chris
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux
--
# Jesse Molina
# Mail = [email protected]
# Page = [email protected]
# Cell = 1.602.323.7608
# Web = http://www.opendreams.net/jesse/
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux