Remote Console
I have an HLDS cstrike server running on Ubuntu 20. I set up an /etc/rc.local script to launch hlds_run at boot so the HLDS Server is running as root. I'm able to SSH to the server. Is there a way to view the console output in real time remotely?
< >
Showing 1-7 of 7 comments
HLSW does the trick for Windows. Still looking for something that will give me the HLSW applications console tab output when I SSH into the Linux Server...

Link to the Windows HLSW Download: https://download.cnet.com/HLSW/3000-2121_4-10965163.html
For Linux I found the solution.

One or more of these changes may be surplus to requirement.

Add the -condebug command to the ./hlds_run command
Add the following values in the server.cfg file

log on
log_detail 3
sv_logfile 1
sv_logecho 1

cd to the cstrike folder and run the following command

tail -f qconsole.log
[N]ebsun 5 Dec, 2021 @ 3:24am 
Remote logging - in a similar way to hlsw, can be done using
logaddress_add <ip>:<port>

The server log will be sent in realtime and plaintext to the target ip over udp on the port specified.
Then you will need something to receive and decode / clean the data and either show it or write it to a file
On Linux. An improvement to the "tail -f qconsole.log" command, if you want to see fewer messages and focus on users connecting and disconnecting, would be to use the following "revised command".

tail -f -n0 .steam/steamcmd/cs/cstrike/qconsole.log | grep -w '.*STEAM.*entered the game\|.*STEAM.*disconnected'

NOTE: The .steam/steamcmd/cs/cstrike folder path is specific to my install

I created a script by:

entering the command: CD ~
entering the command: touch csmon.sh
entering the command: nano csmon.sh
adding this text on line one: #!bash/bin
adding the "revised command" above to line two and using CTRL+O and enter to save the file
using the command CTRL+X to close the file
using the following command to make the script executable: chmod +x csmon.sh

So that now when I log in (via SSH) all I need to type is ./csmon.sh to start monitoring the console and have the read out limited to users connecting and disconnecting. The reason I included the .*STEAM string is because I have BOT's running on the server so this argument means BOT's connecting and disconnecting wont be read out as they don't have steam ID's read out in the console.

I hope this helps someone, as I couldnt find all this info in one place when attempting to get it all configured.
Blaquicat 21 Dec, 2021 @ 5:24am 
Just use screen to start the server..
that way you can atach/detach the screen that is running the server, seeing the console..

Just dont forget to detach before loging out.
https://linuxize.com/post/how-to-use-linux-screen/
unknl 16 Jan, 2022 @ 4:12am 
Cool!:steamthumbsup:
BAD *Man 25 Apr, 2022 @ 11:21am 
just create a new file called "startscript"
post the script , change the DIR to where hlds_run is and the Name (here 2015 appears in Jobs) and the Game parameters to ur liking

I have multible scrips in my home from where i start the servers (the ecos are in German:) )

just put ./startscript start (or stop or restart) and the server runs as screen in the backround
here the script :

#! /bin/sh
#scriptquelle : http://no-Tex.com
NAME=27015
DESC="27015"
PARAMS="-game cstrike +map de_dust2 -maxplayers 32 -port 27015 +ip 62.75.142.93 -tickrate 100 -pingboost 2 -sport -autoupdate"
DIR=/home/csserver/serverfiles
SCRIPT=hlds_run

DAEMON=$DIR/$SCRIPT

case "$1" in
start)
echo "Starte $DESC: $NAME"
cd $DIR
screen -d -m -S $NAME $DAEMON $PARAMS
;;

stop)
if [[ `screen -ls |grep $NAME` ]]
then
echo -n "Stoppe $DESC: $NAME"
kill `screen -ls |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'`
echo " ... Server gestoppt."
else
echo "Konnte keinen laufenden Server mit PID -- $DESC -- nicht finden"
fi
;;

restart)
if [[ `screen -ls |grep $NAME` ]]
then
echo -n "Stoppe $DESC: $NAME"
kill `screen -ls |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'`
echo " ... Server gestoppt ... Kommando Start wird ausgeführt"
else
echo "Konnte keinen laufenden Server mit PID -- $DESC -- nicht finden ... Kommando Start wird ausgeführt"
fi

echo -n "Starte $DESC: $NAME"
cd $DIR
screen -d -m -S $NAME $DAEMON $PARAMS
echo " ... Server gestartet."
;;

*)
echo "Usage: $0 Parameter eingeben {start|stop|restart}"
exit 1
;;
esac

exit 0
< >
Showing 1-7 of 7 comments
Per page: 1530 50