摘要: 1、编写脚本nginx_restart.sh #!/bin/bash ps -ef | grep nginx | grep -v grep > /data/nginx/nginx_restart.txt file=$(cat /data/nginx/nginx_restart.txt | grep 阅读全文
posted @ 2023-11-16 14:59 leihongnu 阅读(87) 评论(0) 推荐(0) 编辑
摘要: ·1、编辑脚本backup.sh #!/bin/bash #进入备份目录 cd /data/nginx/logs/ #设置备份名字newAccessLog="access`date +%Y-%m-%d`.log"newErrorLog="error`date +%Y-%m-%d`.log" #拷贝日 阅读全文
posted @ 2023-11-16 14:56 leihongnu 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 转载:https://www.jianshu.com/p/f105fb19dd0b 1、根据访问IP统计UVawk '{print $1}' access.log|sort | uniq -c |wc -l 2、统计访问URL统计PVawk '{print $7}' access.log|wc -l 阅读全文
posted @ 2023-11-16 14:49 leihongnu 阅读(40) 评论(0) 推荐(0) 编辑