[GH-ISSUE #171] Server Monitor #136

Closed
opened 2026-02-27 01:59:44 +03:00 by kerem · 10 comments
Owner

Originally created by @uGamers on GitHub (Sep 16, 2014).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/171

I set up monitor crontab.
I run the server with this command ./csserver restart
I even tried ./csserver start <Still nothing<

I get this error [ INFO ] Monitoring DMM: No lock file found: Monitor disabled
To enable monitor run /home/cs16/counterstrikeservers/DMM/csserver start

I have a lock file next to the csserver that it makes when the server is started.

The info in the csserver is as followed.

Directories

rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/cstrike"
executabledir="${filesdir}"
executable="./hlds_run"
servercfgdir="${systemdir}"
servercfg="server.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"

Is there something im doing wrong or is this a bug?

Thanks Mark

Originally created by @uGamers on GitHub (Sep 16, 2014). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/171 I set up monitor crontab. I run the server with this command ./csserver restart I even tried ./csserver start <Still nothing< I get this error [ INFO ] Monitoring DMM: No lock file found: Monitor disabled To enable monitor run /home/cs16/counterstrikeservers/DMM/csserver start I have a lock file next to the csserver that it makes when the server is started. The info in the csserver is as followed. # Directories rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )" selfname="$0" lockselfname=$(echo ".${servicename}.lock") filesdir="${rootdir}/serverfiles" systemdir="${filesdir}/cstrike" executabledir="${filesdir}" executable="./hlds_run" servercfgdir="${systemdir}" servercfg="server.cfg" servercfgfullpath="${servercfgdir}/${servercfg}" defaultcfg="${servercfgdir}/server.cfg" backupdir="backups" steamclient="${rootdir}/steamcmd/linux32/steamclient.so" Is there something im doing wrong or is this a bug? Thanks Mark
kerem closed this issue 2026-02-27 01:59:44 +03:00
Author
Owner

@Scarsz commented on GitHub (Sep 16, 2014):

Be sure your user has write access to that folder as a check

<!-- gh-comment-id:55826771 --> @Scarsz commented on GitHub (Sep 16, 2014): Be sure your user has write access to that folder as a check
Author
Owner

@uGamers commented on GitHub (Sep 16, 2014):

Yes they do.

<!-- gh-comment-id:55827234 --> @uGamers commented on GitHub (Sep 16, 2014): Yes they do.
Author
Owner

@Scarsz commented on GitHub (Sep 17, 2014):

Mind doing a new install (or just a different directory) and pasting in the install log?

<!-- gh-comment-id:55840070 --> @Scarsz commented on GitHub (Sep 17, 2014): Mind doing a new install (or just a different directory) and pasting in the install log?
Author
Owner

@uGamers commented on GitHub (Sep 17, 2014):

Where will the install log be?

<!-- gh-comment-id:55840120 --> @uGamers commented on GitHub (Sep 17, 2014): Where will the install log be?
Author
Owner

@Scarsz commented on GitHub (Sep 17, 2014):

./csserver install | tee install.log

<!-- gh-comment-id:55840555 --> @Scarsz commented on GitHub (Sep 17, 2014): `./csserver install | tee install.log`
Author
Owner

@dgibbs64 commented on GitHub (Sep 17, 2014):

something is stopping the lock file being created for some reason. I think we might need to add something on server start to check the lock file does exist and if not create a warning. Might be able to even identify some reasons why its not working e.g permissions etc.

<!-- gh-comment-id:55881559 --> @dgibbs64 commented on GitHub (Sep 17, 2014): something is stopping the lock file being created for some reason. I think we might need to add something on server start to check the lock file does exist and if not create a warning. Might be able to even identify some reasons why its not working e.g permissions etc.
Author
Owner

@uGamers commented on GitHub (Sep 17, 2014):

The lock file is being created but when i crash the server on purpose it does not run the the crontab job i have set.

crontab -e
*/5 * * * * /home/cs16/counterstrikeservers/random/csserver monitor > /dev/null 2>&1

Also your
fn_parms(){
parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}"
}

should be?
fn_parms(){
parms="-game cstrike -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}"
}

not -ip but +ip?

The first part of csserver exec

Steam login

steamuser="anonymous"
steampass=""

Start Variables

defaultmap="de_dust2"
maxplayers="32"
port="27030"
clientport="27005"
ip="192.223.26.228"

https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2

fn_parms(){
parms="-game cstrike -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}"
}

Advanced Variables

Steam

appid="90"

Server Details

servicename="random"
gamename="Counter Strike 1.6"
engine="goldsource"

Directories

rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/cstrike"
executabledir="${filesdir}"
executable="./hlds_run"
servercfgdir="${systemdir}"
servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"

Server Details

servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g')

Logging

logdays="7"
gamelogdir="${systemdir}/logs"
scriptlogdir="${rootdir}/log/script"
consolelogdir="${rootdir}/log/console"

scriptlog="${scriptlogdir}/${servicename}-script.log"
consolelog="${consolelogdir}/${servicename}-console.log"
emaillog="${scriptlogdir}/${servicename}-email.log"

scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log"
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log"

<!-- gh-comment-id:55916869 --> @uGamers commented on GitHub (Sep 17, 2014): The lock file is being created but when i crash the server on purpose it does not run the the crontab job i have set. crontab -e */5 \* \* \* \* /home/cs16/counterstrikeservers/random/csserver monitor > /dev/null 2>&1 Also your fn_parms(){ parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } should be? fn_parms(){ parms="-game cstrike -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } not -ip but +ip? The first part of csserver exec # Steam login steamuser="anonymous" steampass="" # Start Variables defaultmap="de_dust2" maxplayers="32" port="27030" clientport="27005" ip="192.223.26.228" # https://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters_2 fn_parms(){ parms="-game cstrike -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" } #### Advanced Variables # Steam appid="90" # Server Details servicename="random" gamename="Counter Strike 1.6" engine="goldsource" # Directories rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )" selfname="$0" lockselfname=$(echo ".${servicename}.lock") filesdir="${rootdir}/serverfiles" systemdir="${filesdir}/cstrike" executabledir="${filesdir}" executable="./hlds_run" servercfgdir="${systemdir}" servercfg="${servicename}.cfg" servercfgfullpath="${servercfgdir}/${servercfg}" defaultcfg="${servercfgdir}/server.cfg" backupdir="backups" steamclient="${rootdir}/steamcmd/linux32/steamclient.so" # Server Details servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g') rcon=$(grep -s rcon_password "${servercfgfullpath}"|sed 's/rcon_password //g'|sed 's/"//g') # Logging logdays="7" gamelogdir="${systemdir}/logs" scriptlogdir="${rootdir}/log/script" consolelogdir="${rootdir}/log/console" scriptlog="${scriptlogdir}/${servicename}-script.log" consolelog="${consolelogdir}/${servicename}-console.log" emaillog="${scriptlogdir}/${servicename}-email.log" scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log"
Author
Owner

@uGamers commented on GitHub (Sep 18, 2014):

My Guess is that Monitor is broke via crontab or just dont work at all idk ive tried everything i could think of for 3 days still nothing.

<!-- gh-comment-id:56056851 --> @uGamers commented on GitHub (Sep 18, 2014): My Guess is that Monitor is broke via crontab or just dont work at all idk ive tried everything i could think of for 3 days still nothing.
Author
Owner

@UltimateByte commented on GitHub (Sep 18, 2014):

Did you try a machine reboot after setting the crontab ?
Also, check your server logfiles to see if the crontab actyally sends a monitor command to the script. It's located in your root script folder into log/script. You should see monitor occurrences.

<!-- gh-comment-id:56058025 --> @UltimateByte commented on GitHub (Sep 18, 2014): Did you try a machine reboot after setting the crontab ? Also, check your server logfiles to see if the crontab actyally sends a monitor command to the script. It's located in your root script folder into log/script. You should see monitor occurrences.
Author
Owner

@lock[bot] commented on GitHub (Jul 20, 2018):

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:406471725 --> @lock[bot] commented on GitHub (Jul 20, 2018): This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#136
No description provided.