Skip to content

Instantly share code, notes, and snippets.

@pedromamede
Created March 24, 2015 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedromamede/58c6cec55f35c7b808cd to your computer and use it in GitHub Desktop.
Save pedromamede/58c6cec55f35c7b808cd to your computer and use it in GitHub Desktop.
Comandos Unix
#top (inteiro)
top -b > /home/ubuntu/script_top/log_top.txt &
#top (so os processos que estiverem usando mais que 25% da CPU)
watch -n 1 -p "top -bn1 | awk '{if(/^[^0-9 ]/){print}else if(\$9 >= 25.0){print}}' | tail -n +6| tee -a /home/ubuntu/script_top/log_top.txt" &>/dev/null &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment