查看总的文件打开数
lsof
查看占用文件打开数最多的10个进制
lsof | awk '{print $2}' | sort | uniq -c | sort -nr | head -n 10# lsof | awk '{print $2}' | sort | uniq -c | sort -nr | head -n 1031171 1042811398 100610761 10053836 10043500 2144912 1510576 1362494 1620475 1002324 2106
查看系统的文件打开数限制
ulimit -a# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 62332
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 62332
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited