Created
July 8, 2015 07:05
-
-
Save t3chguy/3b7768a8843ae9bd1d9f 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 | |
#!/bin/sh | |
[ -r /etc/lsb-release ] && . /etc/lsb-release | |
if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then | |
# Fall back to using the very slow lsb_release utility | |
DISTRIB_DESCRIPTION=$(lsb_release -s -d) | |
fi | |
upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)" | |
secs=$((${upSeconds}%60)) | |
mins=$((${upSeconds}/60%60)) | |
hours=$((${upSeconds}/3600%24)) | |
days=$((${upSeconds}/86400)) | |
UPTIME=`printf "%d days, %02dh%02dm%02ds" "$days" "$hours" "$mins" "$secs"` | |
IP=`hostname -I | sed 's/[^ ]* //' | tr ' ' '-'` | |
[[ ${MEM[4]%\%} < 80 ]] && MEMP='[1;32m' | |
CPUZ=`grep 'model name' /proc/cpuinfo | head -1`; CPUZ=${CPUZ//(R)/®}; CPUZ=${CPUZ/ CPU/}; CPUZ=${CPUZ/0 @/@} | |
IFS=' ' | |
read one five fifteen rest < /proc/loadavg | |
read -a MEM <<< `df -h / | tail -1` | |
read -a RAM <<< `free -ho | head -2 | tail -1` | |
read -a IP <<< `hostname -I` | |
#clear | |
/usr/bin/clear | |
echo '[H[J' | |
echo | |
echo '[1;33m ./+o+-' | |
echo '[1;33m yyyyy- -yyyyyy+' ' Web Development Guru' | |
echo '[1;33m ://+//////-yyyyyyo' | |
echo '[1;33m .++ .:/++++++/-.+sss/` [1;32m' `whoami` '@' `hostname -f` | |
echo '[1;33m .:++o: /++++++++/:--:/- [1;32m' `date '+%A, %d %B %Y, %T'` | |
echo '[1;33m o:+o+:++.`..```.-/oo+++++/ [1;32m' `uname -srmo` | |
echo '[1;33m .:+o:+o/. `+sssoo+/' | |
echo '[1;33m .++/+:+oo+o:` /sssooo. [1;31m' 'Running Processes......:' `ps ax | wc -l | tr -d ' '` | |
echo '[1;33m /+++//+:`oo+o /::--:. [1;31m' 'Uptime.................:' ${UPTIME} | |
echo '[1;33m \+/+o+++`o++o ++////. [1;31m' 'Load Averages..........:' "${one}, ${five}, ${fifteen} (1, 5, 15 min)" | |
echo '[1;33m .++.o+++oo+:` /dddhhh. [1;31m' 'Central Processing Unit:' ${CPUZ#*: } "*`nproc`" | |
echo '[1;33m .+.o+oo:. `oddhhhh+ [1;31m' 'Memory (RAM)...........:' $RAMP${RAM[2]}B '/' ${RAM[1]}B | |
echo '[1;33m \+.++o+o``-````.:ohdhhhhh+ [1;31m' 'IP Version 4 Addresses.:' '[1;36m'${IP[0]} | |
echo '[1;33m `:o+++ `ohhhhhhhhyo++os: [1;31m' 'IP Version 6 Addresses.:' '[1;36m'${IP[1]} | |
echo '[1;33m .o:`.syhhhhhhh/.oo++o` [1;31m' 'Solid State Drive Size.:' $MEMP${MEM[1]}B | |
echo '[1;33m /osyyyyyyo++ooo+++/ [1;31m' 'Solid State Drive Used.:' $MEMP${MEM[2]}B | |
echo '[1;33m ````` +oo+++o\: [1;31m' 'Solid State Drive Usage:' $MEMP${MEM[4]} | |
echo '[1;33m `oo++.' | |
echo '[0m' | |
printf "Welcome to %s (%s %s %s)\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" "$(uname -r)" "$(uname -m)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment