Created
March 9, 2020 00:56
-
-
Save tnibert/4d4aeb0f20b2dbe7773f75f546a6d774 to your computer and use it in GitHub Desktop.
Monitor linux memory every minute
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 | |
#log memory each minute | |
while true; do | |
dt=`date` | |
mem=`cat /proc/meminfo | grep -E "MemFree"` | |
mem2=`cat /proc/meminfo | grep -E "MemAvailable"` | |
echo -e "$dt \t $mem \t $mem2" | tee -a memlog.txt | |
sleep 60 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment