文章分类 -  Centos

摘要:查找被删除,但还在内存中的文件 find /proc/*/fd -ls | grep '(deleted)' 找到被删除文件 386632172 0 l-wx 1 root root 64 Jun 29 12:03 /proc/9986/fd/23 -> /tmp/3.log (deleted) 通 阅读全文
posted @ 2022-07-19 15:46 thanksw 阅读(28) 评论(0) 推荐(0)
摘要:1、 vim /etc/sysctl.conf net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6=1 2、 vim /etc/rc.local #!/ 阅读全文
posted @ 2022-06-14 20:30 thanksw 阅读(865) 评论(0) 推荐(0)
摘要:Linux下有三个命令:ls、grep、wc。通过这三个命令的组合可以统计目录下文件及文件夹的个数。 统计当前目录下文件的个数(不包括目录) ls -l | grep "^-" | wc -l 统计当前目录下文件的个数(包括子目录) ls -lR| grep "^-" | wc -l 查看某目录下文 阅读全文
posted @ 2022-04-07 14:19 thanksw 阅读(129) 评论(0) 推荐(0)
摘要:背景-线上告警 线上一台服务器告警,磁盘利用率 disk.util > 90,并持续告警。 登录该服务器后通过 iostat -x 1 10 查看了相关磁盘使用信息。相关截图如下: # 如果没有 iostat 命令,那么使用 yum install sysstat 进行安装 # iostat -x 阅读全文
posted @ 2022-03-09 15:52 thanksw 阅读(757) 评论(0) 推荐(0)
摘要:用yum安装的nginx,报unknown directive “stream” 解决方法:yum install nginx-mod-stream -y [root@localhost modules]# yum install nginx-mod-stream -y 已安装: nginx-mod 阅读全文
posted @ 2022-03-02 16:12 thanksw 阅读(1767) 评论(0) 推荐(0)
摘要:rinetd 端口转发 rinetd是一个轻量级TCP转发工具,简单配置就可以实现端口映射/转发/重定向。 (1)源码下载 wget https://li.nux.ro/download/nux/misc/el7/x86_64/rinetd-0.62-9.el7.nux.x86_64.rpm (2) 阅读全文
posted @ 2022-03-01 13:37 thanksw 阅读(241) 评论(1) 推荐(0)
摘要:开启端口 firewall-cmd --zone=public --add-port=80/tcp --permanent 命令含义: --zone #作用域 --add-port=80/tcp #添加端口,格式为:端口/通讯协议 --permanent #永久生效,没有此参数重启后失效 重启防火墙 阅读全文
posted @ 2022-02-15 20:46 thanksw 阅读(70) 评论(0) 推荐(0)