df -h命令卡死

执行df -h命令无返回数据

<1>

发现是之前挂载的windows目录失去连接(windows电脑重启关机等原因)

//10.1.23.75/123 on /mnt type cifs (rw,relatime,vers=1.0,cache=strict,username=Everyone,.......)

[root@localhost ~]# umount -f //10.1.23.75/123 #卸载这个网络挂载

查了百度一下。fuser 命令也是解决办法。并且fuser可以查询是哪个网络连接导致的df -h卡死。但是此处并未用到

<2>

centos7 df -h command卡死无响应
使用starce查看df -h 执行状态

[root@localhost ~]# strace df -h
execve("/usr/bin/df", ["df", "-h"], [/* 34 vars */]) = 0
brk(NULL)                               = 0x25cd000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f59032e0000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/home/software/oracle/product/11gr2/db_1/lib/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/home/software/oracle/product/11gr2/db_1/lib/tls/x86_64", 0x7fff20e019e0) = -1 ENOENT (No such file or directory)
...................
...................
stat("/proc/sys/fs/binfmt_misc", ^C^C^F


"""卡死在了"/proc/sys/fs/binfmt_misc"这个位置"""
[root@localhost python]# systemctl restart proc-sys-fs-binfmt_misc.automount

 

你可能感兴趣的:(坑王驾到)