This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script will monitor system resource load, and pause any nortstar servers that are inactive when the system is at capacity. | |
# The goal is to enable running more servers than the system has resources for, but prevent overload caused by too many servers | |
# becoming populated simultaneously | |
# Usage: "nsloadmanager northstar 400" | |
# "northstar" should be replaced by a keyword contained in all the northstar docker container names, so the script can tell them apart | |
# "400" can be any number, and does not need to be included, by default the threadcount of the system *100 will be used | |
# You can set a higher or lower number, if you want the system to pause/unpause servers sooner/later | |
# Run "nsloadmanager install-daemon" to have this script self-install as a systemd service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE language SYSTEM "language.dtd"> | |
<language name="Squirrel" version="1.0" kateversion="2.5" section="Scripts" extensions="*.nut;*.gnut"> | |
<highlighting> | |
<list name="keywords"> | |
<item> break </item> | |
<item> case </item> | |
<item> catch </item> | |
<item> class </item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Prerequisites: functioning mail command for email notifications, otherwise everything should work | |
# Run "nscrashlogwatcher install-daemon" to have this script self-install as a systemd service | |
if [ "$1" = "install-daemon" ]; then #Run installer and interactively get config details from user | |
echo "You are about to install this script as a systemd daemon." | |
echo "nscrashlogwatcher will be started after this installation, and will be set up to start automatically on boot." | |
echo "As what user should the logs be saved?" | |
read -p 'User: ' USER | |
echo "Logs will be saved as: $USER" |