随笔分类 -  shell

摘要:​ 创建监控脚本: #!/bin/bash # 定义要监控的端口号 PORT=8011 while true; do # 使用netstat或ss命令检查端口是否存在 if ! ss -tuln | grep -q ":$PORT"; then echo "$(date) 端口 $PORT 不存在, 阅读全文
posted @ 2024-09-13 23:13 lytcreate 阅读(347) 评论(0) 推荐(0)