LoginSignup
6
5

More than 3 years have passed since last update.

障害対応に使えるsarコマンドのオプション

Last updated at Posted at 2018-08-20

LOAD AVERAGE(実行待ち平均プロセス数)

$ sar -q
Linux 3.10.0-327.36.3.el7.x86_64 (hostname)     2018年08月21日   _x86_64_    (1 CPU)

00時00分01秒   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15   blocked
00時10分01秒         2       140      0.00      0.02      0.05         0
00時20分01秒         2       140      0.05      0.04      0.05         1
00時30分01秒         2       140      0.00      0.02      0.05         0
00時40分01秒         2       140      0.00      0.01      0.05         0
平均値:          2       140      0.01      0.02      0.05         0

CPU

$ sar -u
Linux 3.10.0-327.36.3.el7.x86_64 (hostname)     2018年08月21日   _x86_64_    (1 CPU)

00時00分01秒     CPU     %user     %nice   %system   %iowait    %steal     %idle
00時10分01秒     all      0.18      0.74      0.14      0.00      0.01     98.94
00時20分01秒     all      0.29      0.60      0.20      0.03      0.02     98.87
00時30分01秒     all      0.22      0.62      0.14      0.01      0.01     99.00
00時40分01秒     all      0.18      0.71      0.14      0.00      0.01     98.96
平均値:      all      0.22      0.67      0.15      0.01      0.01     98.94

メモリ

$ sar -r
Linux 3.10.0-327.36.3.el7.x86_64 (hostname)     2018年08月21日   _x86_64_    (1 CPU)

00時00分01秒 kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit  kbactive   kbinact   kbdirty
00時10分01秒     39088    461736     92.20         0    145796    462352      9.85     89616    119076         0
00時20分01秒     43672    457152     91.28         0    162692    462196      9.84     94220    131308         0
00時30分01秒     33944    466880     93.22         0    171216    463544      9.87    102876    132268         0
00時40分01秒     36532    464292     92.71         0    169836    462484      9.85    101852    130764         0
平均値:      38309    462515     92.35         0    162385    462644      9.85     97141    128354         0

SWAP

$ sar -S
Linux 3.10.0-957.10.1.el7.x86_64 (hostname)     2020年07月05日   _x86_64_    (1 CPU)

00時00分01秒 kbswpfree kbswpused  %swpused  kbswpcad   %swpcad
00時10分01秒   3203480    990820     23.62    164600     16.61
00時20分01秒   3203480    990820     23.62    164596     16.61
00時30分01秒   3203480    990820     23.62    164596     16.61
00時40分01秒   3203736    990564     23.62    165068     16.66
00時50分01秒   3203736    990564     23.62    165068     16.66
01時00分01秒   3203736    990564     23.62    165068     16.66
01時10分01秒   3204760    989540     23.59    170324     17.21

SWAP IN/OUT

$ sar -W
Linux 3.10.0-957.10.1.el7.x86_64 (hostname)     2020年07月05日   _x86_64_    (1 CPU)

00時00分01秒  pswpin/s pswpout/s
00時10分01秒      0.26      4.05
00時20分01秒      0.00      0.00
00時30分01秒      0.00      0.00
00時40分01秒      0.24      0.00
00時50分01秒      0.00      0.00
01時00分01秒      0.00      0.00
01時10分01秒      2.68      0.00

ディスクI/O

$ sar -b
Linux 3.10.0-327.36.3.el7.x86_64 (hostname)     2018年08月21日   _x86_64_    (1 CPU)

00時00分01秒       tps      rtps      wtps   bread/s   bwrtn/s
00時10分01秒      0.85      0.00      0.85      0.00     18.77
00時20分01秒      3.07      2.26      0.80    265.01     16.83
00時30分01秒      1.48      0.60      0.88     32.62     18.58
00時40分01秒      0.82      0.01      0.82      0.08     18.73
平均値:       1.56      0.72      0.84     74.38     18.23

ネットワークI/O

$ sar -n DEV | grep eth1
Linux 3.10.0-957.10.1.el7.x86_64 (hostname)     2020年07月05日   _x86_64_    (1 CPU)

00時00分01秒     IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s
00時10分01秒      eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00
00時20分01秒      eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00
00時30分01秒      eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00
00時40分01秒      eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00
00時50分01秒      eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00
01時00分01秒      eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00
01時10分01秒      eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00
01時20分01秒      eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00
01時30分01秒      eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00
01時40分01秒      eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00
6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5