Bladeren bron

disable ramfs for meteor passes on <2Gi ram systems

(cherry picked from commit 72f43265b5)
Signed-off-by: Nico Rey <rey.nico@gmail.com>
tags/v.1.4
Nico Rey 4 jaren geleden
bovenliggende
commit
0733c045fc
3 gewijzigde bestanden met toevoegingen van 12 en 1 verwijderingen
  1. +4
    -0
      install.sh
  2. +7
    -0
      receive_meteor.sh
  3. +1
    -1
      templates/fstab

+ 4
- 0
install.sh Bestand weergeven

@@ -182,6 +182,10 @@ fi
log_done "Nginx configured"

### Setup ramFS
SYSTEM_MEMORY=$(free -m | awk '/^Mem:/{print $2}')
if [ "$SYSTEM_MEMORY" -lt 2000 ]; then
sed -i -e "s/1000M/200M/g" templates/fstab
fi
set +e
cat /etc/fstab | grep -q "ramfs"
if [ $? -eq 0 ]; then


+ 7
- 0
receive_meteor.sh Bestand weergeven

@@ -5,6 +5,13 @@
. "$HOME/.tweepy.conf"
. "$NOAA_HOME/common.sh"


SYSTEM_MEMORY=$(free -m | awk '/^Mem:/{print $2}')
if [ "$SYSTEM_MEMORY" -lt 2000 ]; then
log "The system doesn't have enough space to store a Meteor pass on RAM" "INFO"
RAMFS_AUDIO="${METEOR_OUTPUT}"
fi

## pass start timestamp and sun elevation
PASS_START=$(expr "$5" + 90)
SUN_ELEV=$(python3 "$NOAA_HOME"/sun.py "$PASS_START")


+ 1
- 1
templates/fstab Bestand weergeven

@@ -1 +1 @@
tmpfs /var/ramfs tmpfs nodev,nosuid,size=400M 0 0
tmpfs /var/ramfs tmpfs nodev,nosuid,size=1000M 0 0

Laden…
Annuleren
Opslaan