未加星标

Install IPTraf on a CentOS / RHEL / Fedora Linux To Get Network Statistics

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二04 | 时间 2018 | 作者 红领巾 ] 0人收藏点击收藏

Install IPTraf on a CentOS / RHEL / Fedora Linux To Get Network Statistics

H ow can I install IPTraf on a CentOS / RHEL / Fedora linux or Red Hat Enterprise Linux to get a variety information on my network?

IPTraf is a console-based network monitoring utility. IPTraf gathers data like TCP connection packet and byte counts, interface statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN station packet and byte counts. iptraf-ng is a fork of iptraf.

IPTraf features

It is a full screen and menu-driven app. You will see information on the IP traffic passing over your network. One can see IP, TCP, UDP, ICMP, non-IP and other IP packet counts, IP checksum errors, interface activity, packet size counts per interface. See the TCP and UDP counts of incoming and outgoing packets for common Linux applications and ports. You can easily discovers active hosts and shows statistics showing the data activity for them on your network. Let us see how to install IPTraf on a CentOS / RHEL / Fedora Linux and use it gather network statistics.

How to install IPTraf on a CentOS / RHEL / Fedora Linux

Type the followingyum command to install IPTraf on a CentOS or RHEL or Oracle or Scientific Linux:

# yum install iptraf

OR

# yum install iptraf-ng
Install IPTraf on a CentOS / RHEL / Fedora Linux To Get Network Statistics
Fedora Linux install IPTraf

Use the dnf command:

$ sudo dnf install iptraf-ng

OR

$ sudo dnf install iptraf

Sample outputs:

Last metadata expiration check: 0:26:38 ago on Saturday 11 August 2018 06:09:09 PM IST. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: iptraf-ng x86_64 1.1.4-18.fc28 fedora 309 k Transaction Summary ================================================================================ Install 1 Package Total download size: 309 k Installed size: 665 k Is this ok [y/N]: y Downloading Packages: iptraf-ng-1.1.4-18.fc28.x86_64.rpm 188 kB/s | 309 kB 00:01 -------------------------------------------------------------------------------- Total 87 kB/s | 309 kB 00:03 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : iptraf-ng-1.1.4-18.fc28.x86_64 1/1 Running scriptlet: iptraf-ng-1.1.4-18.fc28.x86_64 1/1 Verifying : iptraf-ng-1.1.4-18.fc28.x86_64 1/1 Installed: iptraf-ng.x86_64 1.1.4-18.fc28 Complete! How do I use iptraf command?

The syntax is:

iptraf iptraf [options] iptraf -i interface_name_here iptraf-ng -i interface_name_here

To start the IP traffic monitor for eth0 interface type the following command. Pass the -i all option for all interfaces:

# iptraf-ng -i eth0 # iptraf-ng -i wlp4s0 # iptraf -i all

Sample outputs:


Install IPTraf on a CentOS / RHEL / Fedora Linux To Get Network Statistics
Fig.01: iptraf in action

Here is a quick preview of iptraf/iptraf-ng:

https://www.cyberciti.biz/media/new/faq/2012/04/Linux-iptraf-ng-demo.mp4 How to access all main menus

If the iptraf is started without any command-line options, the program comes up in interactive mode, with the various facilities accessed through the main menu as follows:

# iptraf

Sample outputs:


Install IPTraf on a CentOS / RHEL / Fedora Linux To Get Network Statistics
Fig.02: iptraf with menus

To start the general interface statistics, enter:

# iptraf -g # iptraf-ng -g To see the detailed statistics facility on an interface called eth0 # iptraf -d interface_name_here # iptraf -d eth0 # iptraf-ng -d wlp4s0 To see the TCP and UDP monitor on an interface called eth0 # iptraf -z interface_name_here # iptraf -s eth0 # iptraf-ng -s wlp4s0 To displays the packet size counts on an interface called eth0 # iptraf -z interface_name_here # iptraf -z eth0 # iptraf-ng -z wlp4s0 Other options for iptraf-ng command

Here are other options for the program:

-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) -t timeout - when used with one of the above parameters, tells the facility to run only for the specified number of minutes (timeout) -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. -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. Related media

This tutorial is also available in a quick video format:

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

tags: iptraf,ng,interface,install,IPTraf,Linux,eth0
分页:12
转载请注明
本文标题:Install IPTraf on a CentOS / RHEL / Fedora Linux To Get Network Statistics
本站链接:https://www.codesec.net/view/586981.html


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(112)