Skip to content

checks memory utilization and warns or restarts lgsm instance on thresholds

Notifications You must be signed in to change notification settings

DSDV/LGSM-Restart-for-memory-leak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

LGSM-Restart-for-memory-leak

its just a quick dirty copy and paste job that restarts the game on demand when memory usage gets to high to help out a firend so the server does not have to crash or restart in fixed intervals (:

https://linuxgsm.com/

Memory Leak Workaround

memory check

Source: How to simply check free memory and take action when a threshold is reached | Christophe Casalegno

Fixed calculation from: https://www.christophe-casalegno.com/tools/memorycheck.sh

free | awk 'FNR == 2 {print 100-(($2-$3)/$2)*100}' |cut -d "." -f1

rcon

client: GitHub - gorcon/rcon-cli: RCON client for executing queries on game server.

Official commands: Palworld tech guide

Test message

/home/pwserver/rcon/rcon-0.10.3-amd64_linux/rcon -c /home/pwserver/rcon/rcon-0.10.3-amd64_linux/rcon.yaml 'Broadcast This_is_a_testmesage_<3'

crontab to automate

set crontab -e to run mem_check_script.sh every minute

*/1 * * * * /home/pwserver/mem_check_script.sh > /dev/null 2>&1

About

checks memory utilization and warns or restarts lgsm instance on thresholds

Topics

Resources

Stars

Watchers

Forks

Languages