Introduction of the command

The ifstat command is used to collect statistics on the traffic status of a network interface. Ifstat neatly prints network interface statistics and can also be used to disable a specified network interface.

Syntax format

ifstat [OPTIONS]
Copy the code

Option to show

-a # Monitor the status information of all network interfaces that can be detected. -z # Hide the interface where traffic is not present. -H # Display help information -w # use the specified column width. -w # Wrap if the content is wider than the width of the terminal window. -s # Keep status updates on the same line (no scrolling, no line breaks)Copy the code

Application, for example,

Common application

[root@centos7 ~]# ifstat #kernel Interface RX Pkts/Rate TX Pkts/Rate RX Data/Rate TX Data/Rate RX Errs/Drop TX Errs/Drop  RX Over/Rate TX Coll/Rate lo 40261 0 40261 0 2014K 0 2014K 0 0 0 0 0 0 0 0 0 ens33 385230 0 283301 0 44144K 0 77585K 0 0 14 0 0 0 0 0 0 0 0Copy the code

Monitoring specified interfaces

[root@centos7 ~]# ifstat   ens33
#kernel
Interface        RX Pkts/Rate    TX Pkts/Rate    RX Data/Rate    TX Data/Rate  
                 RX Errs/Drop    TX Errs/Drop    RX Over/Rate    TX Coll/Rate  
ens33                118 0            44 0          8712 0          5414 0      
                       0 0             0 0             0 0             0 0
Copy the code

Learn a Linux command every day (106) : openssl

Learn a Linux command every day (107) : SAR

Learn a Linux command every day (108) : iptraf