Pular para o conteúdo principal

Sample Oracle Enterprise Manager script to check the amount of free system memory

$cat get_free_memory.sh

#!/bin/bash

MEMFREE=$(cat /proc/meminfo|grep MemFree|awk '{print $2}')
LOW=10000
echo em_result=$MEMFREE
if [ $MEMFREE -lt $LOW ]; then
echo "em_message=Free Memory low"
fi

$./get_free_memory.sh
em_result=983
em_message=Free Memory low

Comentários

Postar um comentário