Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. LIMIT=10
  4.  
  5. for i in `ps -A -o comm= --sort=+comm | uniq`;
  6. do
  7. if (( `ps -C $i --no-headers | wc -l` > ${LIMIT:=5} )); then
  8. echo `hostname` $i `ps -C $i --no-headers | wc -l` ;
  9. fi
  10. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement