Created
March 9, 2015 13:24
-
-
Save tokenvolt/56c2cda732e9864b2d22 to your computer and use it in GitHub Desktop.
Very simple script to monitor RAM usage on linux machine
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/sh | |
# Using /bin/sh which is guaranteed to be present on any posix system. | |
# If you want to add shell specific parts in the script than replace this. | |
# E.g. if you want to use bash specific stuff then change it to: | |
# #!/usr/bin/env bash | |
# Make sure that the shebang is on the first line of the script (no comments above it!) | |
# While true, pause 5 seconds, then append information to Mylogfile | |
# | |
# Usage: ./ram-monitor.sh >> logfile & | |
# | |
while ( sleep 5 ); do echo "\n=================================" ; date ; free -m ; echo "===================================" ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment