Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ESC=$(printf "\e")
echo "$ESC[34;47mDATE$ESC[0m"
date
echo ""
echo "$ESC[34;47mUPTIME$ESC[0m"
uptime
echo ""
echo "$ESC[34;47mSTATUS$ESC[0m"
top -l1 -u -o cpu -S | head -n 12
echo " "
echo "$ESC[34;47mEstablished$ESC[0m"
lsof -i -n | grep -i established | awk '{print $1" "$8" "$9 }' | head -n 18
echo ""
echo "$ESC[34;47mListen$ESC[0m"
lsof -i -n | grep -i listen | awk '{print $1" "$8" "$9 }' | head -n 18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment