mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-25 22:25:59 +03:00
[GH-ISSUE #171] Server Monitor #136
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 [K[[0;36m INFO [0;39m] 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
@Scarsz commented on GitHub (Sep 16, 2014):
Be sure your user has write access to that folder as a check
@uGamers commented on GitHub (Sep 16, 2014):
Yes they do.
@Scarsz commented on GitHub (Sep 17, 2014):
Mind doing a new install (or just a different directory) and pasting in the install log?
@uGamers commented on GitHub (Sep 17, 2014):
Where will the install log be?
@Scarsz commented on GitHub (Sep 17, 2014):
./csserver install | tee install.log@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.
@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"
@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.
@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.
@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.