通过tcping检测端口连通性

项目地址
https://github.com/jlyo/tcping

安装
git clone https://github.com/jlyo/tcping.git
cd tcping
make install

使用
tcping -p 端口 服务器地址
tcping -p 端口 服务器地址 -c ping次数
tcping -p 端口 服务器地址 -i 间隔(秒)

加时间脚本

cat tcping.sh 
#!/bin/bash

while true; do (date +"%F %T" && tcping -p 8080 127.0.0.1 -c 1 )| egrep "2024|seq" >> tcping.log && sleep 1; done


本博客下载地址

tcping.tar.gz


分享到:
关键词:Linux运维

网友留言(0 条)

发表评论

验证码