本文完整阅读约需 5 分钟,如时间较长请考虑收藏后慢慢阅读~

在对服务器进行压力测试的时候,我们通常会以TCP连接情况(各项连接数统计)作为性能统计基准,可是现有的TCP监视器都提供了太多复杂的功能,既难用也无法满足实际需求。我在Docus项目开发(网站暂时不可用)中遇到了这个问题之后,写了一个小工具,分享给大家使用。


工具地址:LuRenJiasWorld/tcp-mon-GitHub

该工具释出源码,并以Apache2.0协议开源

使用方法:tcp-mon/README.md at master · LuRenJiasWorld/tcp-mon


以下是文档(英文)

tcp-mon

A Simple TCP Connections Count Monitor

CopyRight 2018 LuRenJiasWorld

Usage

# Do it in your bash
wget https://raw.githubusercontent.com/LuRenJiasWorld/tcp-mon/master/install.sh && chmod +x ./install.sh && ./install.sh

Modify

Tcp-mon will automatically installed into /usr/local/bin, and if you want to modify the installation directory, you can:

  1. Download the install.sh
  2. Edit it with your favorate editor
  3. Find # This directory can be modified hint
  4. Modified the directory with what you like
  5. Run chmod +x ./install.sh && ./install.sh

In addition, you can also download the tcpmon.sh and run it ( after properly permission modification using chmod or so ) without installation.

Please Enjoy It !