在 centos7
中,当使用 df
命令查看磁盘空间时被 hang 住,时隔两周决定处理这个问题前端
df
命令 hanging
strace df
,查看系统调用,发现阻塞在了 stat("/proc/sys/fs/binfmt_misc")
mount | grep binfmt
,查看挂载状况,输出 systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=31,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
df
: 查看磁盘使用状况strace
: 查看某命令的系统调用proc-sys-fs-binfmt_misc.automount
与 proc-sys-fs-binfmt_misc.mount
这两个之间存在竞争条件面试
$ systemctl restart proc-sys-fs-binfmt_misc.mount
复制代码
点击阅读原文,方便访问本篇文章页面连接。能够添加我微信 shanyue94 交流,备注岗位与来源信息。centos