讲解一下IPTraf-ng使用方法

IPTraf-ng是用于Linux的基于控制台的网络监视程序,该程序显示有关IP流量的信息,下面为大家详细讲解一下IPTraf-ng的使用方法。

iptraf-ng -h
usage: iptraf-ng [options]
  or: iptraf-ng [options] -B [-i 
  
    | -d 
   
     | -s 
    
      | -z 
     
       | -l 
      
        | -g]    -h, --
       help            show this 
       help message    -i 
       
                    start the IP traffic monitor (use 
        '-i all' 
        for all interfaces)    -d 
        
                     start the detailed statistics facility on an interface    -s 
         
                      start the TCP and UDP monitor on an interface    -z 
          
                       shows the packet size counts on an interface    -l 
           
                        start the LAN station monitor (use 
            '-l all' 
            for all LAN interfaces)    -g                    start the general interface statistics    -B                    run 
            in background (use only with one of the above parameters    -f                    clear all locks and counters    -t 
            
                             run only 
             for the specified 
             
               number of minutes    -L 
              
                         specifies an alternate 
               log file 
              
             
            
           
          
         
        
       
      
     
    
   
  

简要步骤:

“iptraf -g” 显示每一个网卡上的流量:

讲解一下IPTraf-ng使用方法插图

“iptraf -d eth0” 显示指定网卡上的流量统计,总体流量、流入量、流出量、以及按协议分类的流量统计:

讲解一下IPTraf-ng使用方法插图1

“iptraf -s eth0” 统计各port的流量:

讲解一下IPTraf-ng使用方法插图2

“iptraf -i eth0” 查看远程主机端口:

讲解一下IPTraf-ng使用方法插图3

“iptraf -i eth0” 的输出分为两个窗口,上面是TCP socket pairs,下面是UDP。我们根据端口号 使用 lsof 可以找到对应的进程号。

THE END