yuxing 发表于 2019-1-27 07:48:39

linux Too many open files in system

  登录的时候报
  
su: /bin/bash: Too many open files in system
#
检查报警日志没有发现任何错误。
#ulimit -a
core file size          (blocks, -c) 0
data seg size         (kbytes, -d) unlimited
file size               (blocks, -f) unlimited
pending signals               (-i) 1024
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 2048
pipe size            (512 bytes, -p) 8
POSIX message queues   (bytes, -q) 819200
stack size            (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes            (-u) 16384
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
#
查看最大可以打开的文件数量
#cat /proc/sys/fs/file-max
131072
查看各个进程打开的文件数据量
#lsof -n |awk '{print $2 " " $3}'|sort|uniq -c |sort -nr|more
64387 58885 cpabp6
64387 54585 cpabp6
64387 54285 cpabp6
64387 56285 cpabp6
    310 22559 cpabkf
    110 26054 cpabkf
    107 9751 oracle
   99 21942 cpcb33
   97 4768 cpabkf
   96 12641 cpabkf
   86 13568 cpabkf
   82 14326 cpabkf
   79 3360 cpabp7
   79 3354 cpabp7
   79 3351 cpabp7

58885 明显异常

# ps -ef | grep22559
root      569947620 17:19 pts/79   00:00:00 grep 22559
cpabp6   22559 225230 Apr02 ?      00:00:50 /usr/libexec/mysqld --defaults-file=~/etc/my_cpab.cnf --basedir=/usr --datadir=/app/cpabp6/appdata --pid-file=/app/cpabp6/etc/mysqld_cpab.pid --skip-external-locking --port=3210 --socket=/app/cpabp6/etc/mysql_cpab.sock
发现cpabp6用户在执行一个文件



页: [1]
查看完整版本: linux Too many open files in system