We use AWS to host all of our servers. Please contact @Chet Corcos to get set up with the right credentials.
#!/bin/sh
MEM_TOT=`free | grep ^Mem | awk '{print $2}'`
MEM_FRE=`free | grep ^Mem | awk '{print $4}'`
MEM_BUF=`free | grep ^Mem | awk '{print $6}'`
MEM_CAH=`free | grep ^Mem | awk '{print $7}'`
REAL_MEM_FREE=$(($MEM_FRE+$MEM_BUF+$MEM_CAH))
REAL_MEM_USED=$(($MEM_TOT-$REAL_MEM_FREE))
echo "TOTAL: $MEM_TOT"
echo "FREE : $REAL_MEM_FREE"
echo "USED : $REAL_MEM_USED"
while (true) ; do
MEM_TOT=`free | grep ^Mem | awk '{print $2}'`
MEM_FRE=`free | grep ^Mem | awk '{print $4}'`
MEM_BUF=`free | grep ^Mem | awk '{print $6}'`
MEM_CAH=`free | grep ^Mem | awk '{print $7}'`
REAL_MEM_FREE=$(($MEM_FRE+$MEM_BUF+$MEM_CAH))
REAL_MEM_USED=$(($MEM_TOT-$REAL_MEM_FREE))
// pgrep -x httpd | xargs kill -9
if ["'pgrep -x httpd | wc -l'" -ge "500"] ; then
/usr/local/apache2/bin/apachectl restart
fi
sleep1
done
시 / 분 / 초 기본형식
NOW=$(date +"%m-%d-%Y")