Last active
August 6, 2022 17:32
-
-
Save opennikish/516b5fd5fe2ef8ed2c1cc2c592907e0e to your computer and use it in GitHub Desktop.
Simple server resource statistic reporter script
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 | |
# Usage: ./top.sh 5 | tee report.log | |
INTERVAL=$1 | |
while true; do | |
top -b -n 1 | head -n 6 # Use `-l 1` for `-b` (batchmode) on macos | |
sleep $INTERVAL | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment