Skip to content

Instantly share code, notes, and snippets.

@noqqe
Created August 15, 2010 11:24
Show Gist options
  • Save noqqe/525385 to your computer and use it in GitHub Desktop.
Save noqqe/525385 to your computer and use it in GitHub Desktop.
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