今天碰见个这样一个问题,在重启zabbix-agent的时候服务起不来,并且报错
Starting Zabbix agent: zabbix_agentd [16385]: cannot open "var/log/zabbix/zabbix_agentd.log": [23] Too many open files in system
这是因为系统打开的文件太多了,可以用ulimit -a查看当前系统文件最大打开数
[root@localhost ~]# 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) 514314
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) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 514314
virtual memory