From 6f7941d616c8cecf931599b2e6744586c9f584b2 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 31 Jul 2019 01:49:44 +0100 Subject: [PATCH] scripts: import affin.sh --- scripts/affin.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 scripts/affin.sh diff --git a/scripts/affin.sh b/scripts/affin.sh new file mode 100755 index 00000000..34c03d8b --- /dev/null +++ b/scripts/affin.sh @@ -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