Skip to content

Instantly share code, notes, and snippets.

@AlexisDucastel
Created November 29, 2018 10:42
Show Gist options
  • Save AlexisDucastel/ebb884831aeec5827e4df82975e5c4eb to your computer and use it in GitHub Desktop.
Save AlexisDucastel/ebb884831aeec5827e4df82975e5c4eb to your computer and use it in GitHub Desktop.
Second scale system metrics
#!/bin/bash
while true
do
echo "$(sleep 1;free -m|grep Mem:|awk '{print $3}') $(sar 1 1 | grep Average|awk '{print $3" "$4" "$5" "$6" "$7}')" >> /home/ubuntu/metrics.log
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment