for fd in $(ls /proc | egrep [1-9]);do num=$(sudo ls /proc/$fd/fd|wc -l); if [ $num -gt 10000 ]; then echo "pid $fd $num"; fi; done
查找文件描述符fd过多的进程
最新推荐文章于 2023-05-27 18:52:09 发布
for fd in $(ls /proc | egrep [1-9]);do num=$(sudo ls /proc/$fd/fd|wc -l); if [ $num -gt 10000 ]; then echo "pid $fd $num"; fi; done