Last active
April 20, 2023 12:54
-
-
Save Nepherte/f3d6677ac973d0cbec3fc62d6803f647 to your computer and use it in GitHub Desktop.
Message of the day: system info
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 | |
echo "[1m[32m" | |
echo " .~~. .~~. " | |
echo " '. \ ' ' / .' " | |
echo "[31m" | |
echo " .~ .~~~..~. " | |
echo " : .~.'~'.~. : " | |
echo " ~ ( ) ( ) ~ " | |
echo " ( : '~'.~.'~' : )" | |
echo " ~ .~ ( ) ~. ~ " | |
echo " ( : '~' : ) " | |
echo " '~ .~~~. ~' " | |
echo " '~' [m" | |
let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)" | |
let secs=$((${upSeconds}%60)) | |
let mins=$((${upSeconds}/60%60)) | |
let hours=$((${upSeconds}/3600%24)) | |
let days=$((${upSeconds}/86400)) | |
UPTIME=`printf "%d days, %d hours, %d minutes" "$days" "$hours" "$mins"` | |
read one five fifteen rest < /proc/loadavg | |
read updates < /var/run/updates-available | |
echo "$(tput sgr0) | |
`date +"%A, %e %B %Y, %r"` | |
`uname -srmo` | |
$(tput sgr0)- Uptime.............: ${UPTIME} | |
$(tput sgr0)- Memory.............: `free | grep Mem | awk '{print $3/1024}'` MB / `cat /proc/meminfo | grep MemTotal | awk {'print $2/1024'}` MB | |
$(tput sgr0)- CPU Load...........: ${one}, ${five}, ${fifteen} (1, 5, 15 min) | |
$(tput sgr0)- File System........: $(df -h / | grep / | awk '{ print $5 " of " $2 }') in use on / | |
$(tput sgr0)- IP Addresses.......: `hostname -I | /usr/bin/cut -d " " -f 1` and `curl -s ifconfig.me` | |
$(tput sgr0)${updates} updates can be applied immediately." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment