Skip to main content

linux服务器网络流量分析工具,详细到ip连接情况

Project description

logo

🌈 介绍

|🌐[ 中文说明 ] |🌐 [ English Introduction ] |

😈TMD🖕TOP 是一款Linux终端专用的网络流量监控工具,能实时展示服务器与各客户端IP连接数、上传下载速度及带宽使用情况。它深度分析各类服务和脚本对网络资源的影响,帮助运维人员快速识别并优化高带宽消耗的服务,以确保系统性能高效稳定。凭借简洁易读的表格视图和灵活筛选功能,TMD-TOP是管理员进行网络管理与性能调优的理想助手。

顺手点个star⭐

1708502942300

🌈 版本要求

👊注意:

python >= 3.8

🌈 安装教程

sudo pip install tmd-top

🌈更新

sudo pip install --upgrade tmd-top

🌈 使用说明

在终端上执行运行tmd-top命令

root@davin-system:~/tmd-top# tmd-top

🌈 快捷指令

快捷指令

1708502426439

"q"---quit    #退出
'v'---InputPID		#输入pid进行查询
't'---LowSpeedRefresh		#慢速刷新数据
'y'---RestoreRefresh		#恢复刷新数据速度
'c'---ConnectionNumberSort	#连接数排序
'i'---IpNumberSort		#ip数量排序
'u'---UploadSort			#上传排序
'd'---DownloadSort 		#下载排序
'z'---CpuSort				#cpu排序
'x'---MemorySort			#内存排序
'n'---IoReadSort			#io读排序
'm'---IoWriteSort			#io写排序

🌈 IP识别

数据来源: ip识别是使用geoip来实现的,目前geoip的更新时间是: ⌚️ 2024-08-13

🌈 数据展示图

服务器监听流量

1708660148602

服务器运行程序产生的流量

1708660204271

服务器网卡流量

1708502247441

详细客户端流量

1708502358692

🌈 创作想法

作为一名Linux运维人员,我发现FinalShell的流量视图功能在排查网络问题时极为高效实用。尽管尝试过iftop和nload等工具,但其易用性和可视化效果均不及FinalShell。因此,鉴于对FinalShell流量监控功能的依赖,我决定借鉴其设计思路,自行开发一款直观精确的网络流量监控工具以满足工作需求。

🌈 软件架构

  1. 这里是列表文本数据收集模块:通过Python的subprocess或os库执行Linux底层命令(如netstat),实时获取服务器内部TCP连接的状态信息。这些信息包括但不限于客户端IP、端口、连接状态、传输速率等关键指标。

  2. 这里是列表文本数据库存储模块:利用SQLite作为本地持久化存储解决方案,将收集到的TCP连接数据以结构化形式写入数据库表中。此模块负责创建和管理数据库连接,以及执行SQL插入操作。

  3. 数据处理模块:对原始数据进行预处理和格式化,例如转换为适合存储在SQLite中的格式,并可能进一步进行数据分析,计算出如每秒上传下载速度、并发连接数等高级统计指标。

  4. 用户界面展示模块:基于textual库构建终端界面,动态显示从数据库中读取的TCP连接统计数据。

请作者喝杯咖啡

如果该项目对你有帮助,帮您解决了问题,可以请作者喝杯咖啡!!!

输入图片说明

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tmd_top-2.1.4.tar.gz (25.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tmd_top-2.1.4-py3-none-any.whl (25.8 MB view details)

Uploaded Python 3

File details

Details for the file tmd_top-2.1.4.tar.gz.

File metadata

  • Download URL: tmd_top-2.1.4.tar.gz
  • Upload date:
  • Size: 25.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for tmd_top-2.1.4.tar.gz
Algorithm Hash digest
SHA256 334b1f201eb8979b5227a3a7288061763d446f6ab392e428322f782f3ed9a92f
MD5 8c44a44a0c95d8a4f1dc037dda3df2db
BLAKE2b-256 518fe27efd9cf4b01a27458d733f899fd922bcbc2688f76e4faa00e4421baaea

See more details on using hashes here.

File details

Details for the file tmd_top-2.1.4-py3-none-any.whl.

File metadata

  • Download URL: tmd_top-2.1.4-py3-none-any.whl
  • Upload date:
  • Size: 25.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for tmd_top-2.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d5e666505dd581ce70fa41325449bd485c06c18340eff267e809d71b86d2668f
MD5 ec7b901db6d5c6a9d7cde4e8324eadc7
BLAKE2b-256 da2da5ce12044087a40f6d8791d4893df49fb7f7d9247f7fdc104a5bc6688240

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page