Linux command
ifstat 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
ifstat
Example
ifstat [5]
Example
ifstat -b
Example
ifstat -i [eth0],[wlan0]
Example
ifstat -T
Example
ifstat -a
说明
ifstat reports network interface bandwidth just like vmstat/iostat do for other system counters. It keeps history between invocations and by default shows the difference since the last call. The positional argument _delay_ sets the update interval in seconds (default 1). An optional _count_ limits the number of updates. A second delay can be specified separated by a slash for alternating intervals. Note: Two different tools share the name ifstat. The standalone version (section 1) described here is the most common. The iproute2 version (section 8) has different options.
参数
- -a
- Ignore the history file and show absolute counters since boot
- -b
- Report bandwidth in kbits/sec instead of kbytes/sec
- -e
- Show errors
- -i _IFACE_
- Monitor only the specified interfaces (comma-separated)
- -l
- Enable monitoring of loopback interfaces
- -n
- Turn off display of the header periodically
- -r
- Reset history
- -S
- Keep stats on the same line (no scrolling)
- -T
- Show total bandwidth for all monitored interfaces
- -t
- Add a timestamp at the beginning of each line
- -w
- Use fixed-width columns
- -z
- Hide interfaces with zero counters
FAQ
What is the ifstat command used for?
ifstat reports network interface bandwidth just like vmstat/iostat do for other system counters. It keeps history between invocations and by default shows the difference since the last call. The positional argument _delay_ sets the update interval in seconds (default 1). An optional _count_ limits the number of updates. A second delay can be specified separated by a slash for alternating intervals. Note: Two different tools share the name ifstat. The standalone version (section 1) described here is the most common. The iproute2 version (section 8) has different options.
How do I run a basic ifstat example?
Run `ifstat` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a do in ifstat?
Ignore the history file and show absolute counters since boot