问题备忘

问:md文件无法显示github上的图片问题
答:将github上的图片路径中的blog替换为raw

问:linux 如何清除buff/cache
答:echo 3 | sudo tee /proc/sys/vm/drop_caches
此命令可以正常清除,不会报permission denied。

问:linux 打开文件数 too many open files 解决方法
查看每个用户最大允许打开文件数量 ulimit -a
查看已打开的文件数:lsof | wc -l
查看某进程已打开的文件数:lsof -p pid | wc -l
修改系统配置vim /etc/security/limits.conf 在最后加入
* soft nofile 4096
* hard nofile 4096
其中*表示所有用户,建议针对用户进行设置,如 root soft nofile 4096
遇到此问题,除了修改系统配置外,还可以在应用程序中限制下最大打开数。

猜你喜欢

转载自blog.csdn.net/adwen2009/article/details/86638821