← 返回命令列表

Linux command

sadc 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Example

sadc 1 10 [/tmp/datafile]

Example

sadc 1 10 -

Example

sadc -S ALL 1 10 [/tmp/datafile]

Example

sadc -S XDISK 1 10 [/tmp/datafile]

Example

sadc -C "[system reboot]" [/var/log/sa/sa01]

说明

sadc (System Activity Data Collector) is the backend data collector for the sar command, part of the sysstat package. It samples system performance data at specified intervals and writes it in binary format to an output file. The collector gathers metrics including CPU utilization, memory usage, I/O statistics, network activity, and process information. By default, it collects most kernel data except interrupts and disk statistics, which require explicit -S flags. When outfile is set to -, sadc writes to the standard daily data file /var/log/sa/saDD. If count is omitted, sadc runs endlessly. The binary output is not human-readable and requires sar to interpret.

参数

-C _comment_
Write a dummy record containing the specified comment string when interval and count are not specified
-D
Use saYYYYMMDD instead of saDD as the standard daily data file name
-F
Force creation of outfile; truncate if it exists with an incompatible format
-L
Try to get an exclusive lock on the outfile before writing or truncating
-S _keyword_
Specify optional activities to collect: INT (interrupts), DISK (block devices), XDISK (partitions/filesystems), SNMP, IPV6, POWER, ALL, XALL
-V
Print version number and exit

FAQ

What is the sadc command used for?

sadc (System Activity Data Collector) is the backend data collector for the sar command, part of the sysstat package. It samples system performance data at specified intervals and writes it in binary format to an output file. The collector gathers metrics including CPU utilization, memory usage, I/O statistics, network activity, and process information. By default, it collects most kernel data except interrupts and disk statistics, which require explicit -S flags. When outfile is set to -, sadc writes to the standard daily data file /var/log/sa/saDD. If count is omitted, sadc runs endlessly. The binary output is not human-readable and requires sar to interpret.

How do I run a basic sadc example?

Run `sadc 1 10 [/tmp/datafile]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -C _comment_ do in sadc?

Write a dummy record containing the specified comment string when interval and count are not specified