瀏覽代碼

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 年之前
父節點
當前提交
0733c045fc
共有 3 個檔案被更改,包括 12 行新增1 行删除
  1. +4
    -0
      install.sh
  2. +7
    -0
      receive_meteor.sh
  3. +1
    -1
      templates/fstab

+ 4
- 0
install.sh 查看文件

@@ -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 查看文件

@@ -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 查看文件

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

Loading…
取消
儲存