随笔分类 -  linux

摘要:开机启动后,php/nginx 文件打开数还是1024,但是系统设置已经为10240了,导致上线系统无法使用 排查方法: cat /proc/2825/limits,查看Max open fies数 2825为进程ID 解决办法:重启nginx与php,具体原因有时间再研究吧 阅读全文
posted @ 2020-12-22 16:38 centosboy 阅读(150) 评论(0) 推荐(0)
摘要:autossh介绍: autossh 是一个用来启动 ssh 并进行监控的程序,可在需要时重启 ssh,如果程序问题或者是网络问题。其灵感和机制来自于 rstunnel (Reliable SSH Tunnel). autossh 1.2 的方法已经改变:autossh 使用 ssh 来构造一个 s 阅读全文
posted @ 2020-12-15 15:09 centosboy 阅读(283) 评论(0) 推荐(0)
摘要:前记: 脚本称为《rm后悔药》吧,虽然多年运维,依旧无法避免误操作,既然无法避免,就做好误删准备。脚本参考之前转载的文章,进行了简单的完善。 脚本内容: #创建回收站 mkdir -p /opt/apps/.recover/ chmod 777 /opt/apps/.recover mkdir -p 阅读全文
posted @ 2020-12-15 14:54 centosboy 阅读(140) 评论(0) 推荐(1)
摘要:1.ll -i 查看当前文件所有的inode [root@server1 ~]# ll -i 123 100741442 -rw-r--r-- 1 root root 0 1月 8 16:25 123 2.find . -inum find . -inum 100741442 -delete 阅读全文
posted @ 2020-12-15 14:50 centosboy 阅读(246) 评论(0) 推荐(0)
摘要:在用ntpdate同步时间时,提示如下错误,我的服务器在机房托管,很可能机房将NTP流量屏蔽。 [root@localhost htpdate]# ntpdate ntp.neu6.edu.cn 3 Apr 20:13:31 ntpdate[19954]: no server suitable fo 阅读全文
posted @ 2020-12-15 14:30 centosboy 阅读(399) 评论(0) 推荐(0)
摘要:需求:由于生产环境有丢包情况,想确认丢包的时间点,记录到ELK系统进行分析 实现过程:这里是使用ping命令来实现,结果发现centos 7.5 ping命令结果含有时间字段,但是centos 6.7 ping结果无时间字段,google查找,发现也有人有这个需求,经过测试,找到解决方案: cent 阅读全文
posted @ 2020-12-15 14:21 centosboy 阅读(441) 评论(0) 推荐(0)
摘要:ping www.baidu.com -c 30 |tee -a /tmp/ping.log 阅读全文
posted @ 2020-12-15 13:57 centosboy 阅读(316) 评论(0) 推荐(0)