解决tail命令提示“tail: inotify 资源耗尽,无法使用 inotify 机制,回归为 polling 机制”
临时解决方法:
#查看 inotify 的相关配置
$ sysctl fs.inotify
fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 8192
#临时修改配置(重启后会恢复)
$ sudo sysctl -w fs.inotify.max_user_watches=100000
永久解决方法:
$ sudo echo fs.inotify.max_user_watches=100000 | sudo tee -a /etc/sysctl.conf
#重载配置文件,使之马上生效
$ sudo sysctl -p
