2024-10-10

This commit is contained in:
2024-10-10 12:56:56 +08:00
commit 7b347c848a
2648 changed files with 643965 additions and 0 deletions

8
install/oomsaver.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
pgrep -f "/usr/sbin/sshd" | while read PID;do echo -17 > /proc/$PID/oom_score_adj;done
pgrep -f "php-fpm" | while read PID;do echo -17 > /proc/$PID/oom_score_adj;done
pgrep -f "mysql" | while read PID;do echo -17 > /proc/$PID/oom_score_adj;done
if test -e /swap ;then swapon /swap ;fi
echo 100 > /proc/sys/vm/swappiness
echo "set global connection_memory_limit=20971520;" | mysql