检查一个容器的进程绑核情况
目录
获取容器id
#!/bin/bash
now=$(date +%s)
dockerids=$(docker ps | grep xx-pod | grep yy-container | awk '{print $1}')
for item in ${dockerids[@]}; do
echo "dockerid: ${item}"
echo "dockerid: ${item}" >>> ${now}_result.txt
docker exec ${item} bash -c "ps -elL | grep zzz-proc | awk '{print \$6}' | xargs -I {} taskset -pc {} " >>> ${now}_result.txt
done