Created
May 18, 2024 08:26
-
-
Save yazanmonshed/11d532238b1543d276003590321c9770 to your computer and use it in GitHub Desktop.
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 | |
while true; do | |
clear | |
echo "System Resource Monitoring" | |
echo "--------------------------" | |
# Display CPU usage | |
echo "CPU Usage:" | |
top -n 1 -b | grep "Cpu" | |
# Display memory usage | |
echo -e "\nMemory Usage:" | |
free -h | |
# Display disk space usage | |
echo -e "\nDisk Space Usage:" | |
df -h | |
sleep 5 # Wait for 5 seconds before the next update | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment