V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
xxhjkl
V2EX  ›  问与答

centos 7 下怎么看端口流量

  •  
  •   xxhjkl · 2015-11-07 01:14:29 +08:00 · 6555 次点击
    这是一个创建于 3115 天前的主题,其中的信息可能已经有所发展或是发生改变。
    RT LZ 和小伙伴们合租了一台 linode 的服务器最近搞了个 centos 7 搞了锐速和 SS 来翻

    然后想看一下各个端口的流量情况。
    yum install iptraf
    提示安装成功以后
    执行 iptraf

    [root@localhost ~]# iptraf
    -bash: iptraf: command not found

    whereis 看一下的话
    [root@localhost ~]# whereis -b iptraf
    iptraf:

    似乎是没安装。死循环了
    换了一个工具
    iftop
    直接执行也是 not found
    如果 yum 安装 就提示没有

    so centos7 该怎么看端口流量。
    7 条回复    2019-10-29 10:46:07 +08:00
    ryd994
        1
    ryd994  
       2015-11-07 01:22:09 +08:00 via Android
    yum install epel-release
    再装就可以了
    另外我一般用 jnettop
    shierji
        2
    shierji  
       2015-11-07 09:23:35 +08:00
    你是没 sbin 目录权限?换 root 试试?
    xxhjkl
        3
    xxhjkl  
    OP
       2015-11-07 09:26:27 +08:00
    @shierji [root@localhost ~]# 肯定是 root 用户啊
    branchzero
        4
    branchzero  
       2015-11-07 11:15:00 +08:00
    一楼正解,
    先装 epel ,再装 iftop ,官方仓库没这玩意。
    asdf1234yu
        5
    asdf1234yu  
       2017-12-04 17:22:59 +08:00
    楼主这个需求解决了吗 怎样看端口总流量 不是实时的那种?
    xxhjkl
        6
    xxhjkl  
    OP
       2017-12-04 17:39:06 +08:00
    @asdf1234yu #5 有个开源的 ssr 的管理脚本可以实现我的需求。所以就没有研究下去了
    Apol1oBelvedere
        7
    Apol1oBelvedere  
       2019-10-29 10:46:07 +08:00
    @xxhjkl 脚本网址方便分享一下吗?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   896 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 21:31 · PVG 05:31 · LAX 14:31 · JFK 17:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.