scripts: import affin.sh

This commit is contained in:
David Wilson 2019-07-31 01:49:44 +01:00
parent 558ebfa914
commit 6f7941d616
1 changed files with 4 additions and 0 deletions

4
scripts/affin.sh Executable file
View File

@ -0,0 +1,4 @@
# show process affinities for running ansible-playbook
who="$1"
[ ! "$who" ] && who=ansible-playbook
for i in $(pgrep -f "$who") ; do taskset -c -p $i ; done|cut -d: -f2|sort -n |uniq -c