博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
iptraf用法
阅读量:6998 次
发布时间:2019-06-27

本文共 1901 字,大约阅读时间需要 6 分钟。

hot3.png

iptraf用法

2017年11月24日 23:56:10  阅读数:218 标签:  更多

个人分类: 

版权声明: https://blog.csdn.net/daiqi5527153/article/details/78629320

语法

    iptraf [ -f ] [ { -i iface | -g | -d iface | -s iface | -z iface |
           -l iface } [ -t timeout ] [ -B ] [ -L logfile ] [-I interval] ] 
如果不写任何参数打开iptraf则会出现一个菜单选项用户只要选项相应的选项即可对网络设备进行监控了
也可以使用命令参数的形式打开iptraf,如下命令参数
打开ip流量监控-i all则监视所有的网络设备
-i iface    - start the IP traffic monitor (use "-i all" for all interfaces)
用法:
监控eth0
iptraf -i eth0
监控所有网卡
iptraf -i all
网络连接统计概况
-g          - start the general interface statistics
用法:
iptraf -g
监控某个网卡详细的统计数据
-d iface    - start the detailed statistics facility on an interface
用法:
iptraf -d eth0
监控某个网卡上的TCP和UDP连接包等信息
-s iface    - start the TCP and UDP monitor on an interface
用法:
iptraf -s eth0
监控某个网卡上的包大小及相关计数(包大小的分布)
-z iface    - shows the packet size counts on an interface
用法:
iptraf -z eth0
-l iface    - start the LAN station monitor ("-l all" for all LAN interfaces)
后台运行只能使用以上的命令行参数运行
-B          - run in background (use only with one of the above parameters)
用法:
iptraf -B eth0
指定-t以使用程序运行指定的时间后退出
-t timeout  - when used with one of the above parameters, tells
              the facility to run only for the specified number of
              minutes (timeout)
用法:
运行一分钟后退出
iptarf -i all -t 1              
        
输出logfile到指定的文件如果不指定则会输出到/var/log/iptraf/文件夹中        
-L logfile  - specifies an alternate log file for any direct invocation
              of a facility from the command line.  The log is placed in
              /var/log/iptraf if path is not specified.
用法:
输出log到~/iptraf.log
iptraf -i all -L ~/iptraf.log
             
指定log文件的输出间隔这个参数对除了IP监视之后的其它参数有效参数单位为分钟             
-I interval - specifies the log interval for all facilities except the IP
              traffic monitor.  Value is in minutes.
这个参数很少用到
              
清除所有的锁及计数器.使用这个参数时要小心,最好只在出错恢复时使用              
-f          - clear all locks and counters.  Use with great caution.
              Normally used to recover from an abnormal termination.
用法:
iptraf -f
 

IPTraf 3.0.1 Copyright (c) Gerard Paul Java 1997-2004

转载于:https://my.oschina.net/u/3367404/blog/2992488

你可能感兴趣的文章
世界杯千万级直播高稳定的挑战和实践
查看>>
【全栈开发】精通 MEAN: MEAN 堆栈
查看>>
【译】杂谈:HTML 5的消息通知机制
查看>>
公共云上的专有资源池-阿里云专有宿主机
查看>>
Twitch如何实现转码比FFmpeg性能提升65%?(下)
查看>>
苏宁发布区块链白皮书,披露零售、物流、金融等场景实践
查看>>
[20180502]ORA-01580.txt
查看>>
笨办法学 Python · 续 练习 29:`diff`和`patch`
查看>>
十年Python大牛花了三天总结出来的python基础知识实例,超详细!
查看>>
C++开发的数据库连接查询修改小工具
查看>>
比特币创始人开发新型保值持久性货币,或将碾压现有数字货币
查看>>
展望下一代超级计算机
查看>>
「深度」全国仅有617位AI专家,高校开设AI学院能否填补人才缺口?
查看>>
大数据技术人年度盛事! BDTC 2016将于12月8-10日在京举行
查看>>
Android源码剖析之Framework层实战版(Ams管理Activity启动)
查看>>
Spring MVC异常处理实例
查看>>
2017 IAI国际创享节第二日:创享不止,精彩继续
查看>>
Android基础之Activity launchMode详解
查看>>
h.264直接预测
查看>>
22【在线日志分析】之项目第二阶段概述
查看>>