riteshchikatwar

Untitled

Nov 29th, 2019
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. #!/bin/bash
  2. declare -a arr=("iostat" "vmstat" "mpstat" "top" "sar" "pidstat")
  3. for x in "${arr[@]}"
  4. do
  5. ps -ef | grep '${x}' | grep -v grep | awk '{print $2}' | xargs kill
  6. done
Advertisement
Add Comment
Please, Sign In to add comment