Linux command
sar 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
sar -b 1
Example
sar -n DEV 2 10
Example
sar -u ALL 2
Example
sar -r ALL 1 20
Example
sar -q 1
Example
sar -B 5
Example
sar -d 1
说明
sar (System Activity Reporter) collects, reports, and saves system activity information. It can report on CPU, memory, I/O, network, and other subsystem performance.
参数
- -b
- Report I/O and transfer rate statistics
- -B
- Report paging statistics
- -d
- Report disk I/O statistics
- -n KEYWORD
- Report network statistics (DEV, EDEV, NFS, SOCK, IP, etc.)
- -q
- Report queue length and load averages
- -r ALL
- Report memory utilization statistics
- -u ALL
- Report CPU utilization
- -v
- Report status of inode, file, and other kernel tables
- -w
- Report task creation and system switching activity
- -W
- Report swapping statistics
- -y
- Report TTY devices activity
- -f FILE
- Read data from specified file
- -o FILE
- Write data to specified file
- -s TIME
- Set start time for report
- -e TIME
- Set end time for report
- -P {cpu|ALL}
- Report per-processor statistics
- -j {ID|LABEL|PATH|UUID}
- Display persistent device names
FAQ
What is the sar command used for?
sar (System Activity Reporter) collects, reports, and saves system activity information. It can report on CPU, memory, I/O, network, and other subsystem performance.
How do I run a basic sar example?
Run `sar -b 1` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -b do in sar?
Report I/O and transfer rate statistics