Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Get system information
- UPTIME=$(awk '{print int($1/3600) ":" int(($1%3600)/60)}' /proc/uptime)
- RAM_USED=$(free -h | awk '/Mem:/ {print $3 "/" $2}')
- CPU_USAGE=$(top -bn1 | grep 'Cpu(s)' | awk '{print 100 - $8"%"}')
- DISK_USAGE=$(df -h / | awk 'NR==2 {print $3 "/" $2 " used"}')
- CPU_TEMP=$(exec sensors | grep 'temp1' | awk 'NR==2{print $2}')
- # Display results
- echo "⌚️$UPTIME 📝️: $RAM_USED 🧠️: $CPU_USAGE 💾️: $DISK_USAGE 🌡️: ${CPU_TEMP//+}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement