スポンサーリンク

このドキュメントの内容は、以下の通りです。

sar コマンドは、システムのアクティビティの情報を表示するコマンドです。
CentOS の場合、 sysstat パッケージに含まれています。

インストール


CentOS に yum コマンドでインストールする場合。

sudo yum -y install sysstat

パッケージ説明


Name        : sysstat
Arch        : x86_64
Version     : 9.0.4
Release     : 20.el6
Size        : 807 k
Repo        : installed
From repo   : base
Summary     : The sar and iostat system monitoring commands
License     : GPLv2+
Description : This package provides the sar and iostat commands for Linux. Sar
            : and iostat enable system monitoring of disk, network, and other IO
            : activity.

;

参考


cron の設定


cron の設定は、下記のファイルにあります。
/etc/cron.d/sysstat

# Run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib64/sa/sa1 1 1
# 0 * * * * root /usr/lib64/sa/sa1 600 6 &
# Generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib64/sa/sa2 -A

ファイル


/etc/cron.d/sysstat
/etc/rc.d/init.d/sysstat
/etc/sysconfig/sysstat
/etc/sysconfig/sysstat.ioconf
/usr/bin/cifsiostat
/usr/bin/iostat
/usr/bin/mpstat
/usr/bin/pidstat
/usr/bin/sadf
/usr/bin/sar
/usr/lib64/sa
/usr/lib64/sa/sa1
/usr/lib64/sa/sa2
/usr/lib64/sa/sadc
/usr/share/doc/sysstat-9.0.4
/usr/share/doc/sysstat-9.0.4/CHANGES
/usr/share/doc/sysstat-9.0.4/COPYING
/usr/share/doc/sysstat-9.0.4/CREDITS
/usr/share/doc/sysstat-9.0.4/FAQ
/usr/share/doc/sysstat-9.0.4/README
/usr/share/doc/sysstat-9.0.4/TODO
/usr/share/locale/af/LC_MESSAGES/sysstat.mo
/usr/share/locale/da/LC_MESSAGES/sysstat.mo
/usr/share/locale/de/LC_MESSAGES/sysstat.mo
/usr/share/locale/es/LC_MESSAGES/sysstat.mo
/usr/share/locale/fi/LC_MESSAGES/sysstat.mo
/usr/share/locale/fr/LC_MESSAGES/sysstat.mo
/usr/share/locale/id/LC_MESSAGES/sysstat.mo
/usr/share/locale/it/LC_MESSAGES/sysstat.mo
/usr/share/locale/ja/LC_MESSAGES/sysstat.mo
/usr/share/locale/ky/LC_MESSAGES/sysstat.mo
/usr/share/locale/lv/LC_MESSAGES/sysstat.mo
/usr/share/locale/mt/LC_MESSAGES/sysstat.mo
/usr/share/locale/nb/LC_MESSAGES/sysstat.mo
/usr/share/locale/nl/LC_MESSAGES/sysstat.mo
/usr/share/locale/nn/LC_MESSAGES/sysstat.mo
/usr/share/locale/pl/LC_MESSAGES/sysstat.mo
/usr/share/locale/pt/LC_MESSAGES/sysstat.mo
/usr/share/locale/pt_BR/LC_MESSAGES/sysstat.mo
/usr/share/locale/ro/LC_MESSAGES/sysstat.mo
/usr/share/locale/ru/LC_MESSAGES/sysstat.mo
/usr/share/locale/sk/LC_MESSAGES/sysstat.mo
/usr/share/locale/sv/LC_MESSAGES/sysstat.mo
/usr/share/locale/vi/LC_MESSAGES/sysstat.mo
/usr/share/locale/zh_CN/LC_MESSAGES/sysstat.mo
/usr/share/locale/zh_TW/LC_MESSAGES/sysstat.mo
/usr/share/man/man1/cifsiostat.1.gz
/usr/share/man/man1/iostat.1.gz
/usr/share/man/man1/mpstat.1.gz
/usr/share/man/man1/pidstat.1.gz
/usr/share/man/man1/sadf.1.gz
/usr/share/man/man1/sar.1.gz
/usr/share/man/man8/sa1.8.gz
/usr/share/man/man8/sa2.8.gz
/usr/share/man/man8/sadc.8.gz
/var/log/sa

実行例


% sar
Linux 2.6.32-220.7.1.el6.x86_64 (u0.local) 	20120624 	_x86_64_	(4 CPU)

000001       tps      rtps      wtps   bread/s   bwrtn/s
001001      0.32      0.00      0.32      0.00      3.44
002001      0.48      0.00      0.48      0.00      5.27
003001      0.54      0.00      0.54      0.01      6.55
004001      0.94      0.03      0.91      2.72     13.04
005001      1.05      0.17      0.88      5.27     12.09
010001     15.45      0.08     15.37      1.85   9811.83
011001     70.83      1.98     68.85    241.32  49117.37
012001     80.15     10.89     69.26   1320.65  49387.93
013002    126.18     60.82     65.36   8477.76  46567.38
014002    168.68    130.04     38.64  16655.19  31507.04
015001      6.99      4.90      2.08    600.77   1308.01
020002     10.11      6.58      3.54    292.72   1150.70
145001     21.62     19.99      1.63   1006.65     69.88
150001      0.42      0.13      0.29      8.95      4.09
151001  10004.64    177.65   9826.99  42004.43 117453.81
152001   2001.81     25.88   1975.93   5628.56  23533.45
153001  13486.82     81.55  13405.26  12086.01 159768.32
154001  13722.57    244.02  13478.55  28738.31 160679.06
155002  13362.22    206.39  13155.83  27527.00 156462.05
160001  13539.63    293.36  13246.27  40582.62 158192.00
161001  13241.42    343.38  12898.04  43754.29 153699.72
162001  13534.87    241.10  13293.77  28409.26 158433.67
163001  13386.54    310.78  13075.76  40846.06 155826.46
164001  13528.30    269.68  13258.62  31964.65 158005.86
165001  13401.86    317.81  13084.05  36658.60 155921.78
170001  13352.84    366.47  12986.37  38840.10 154739.99
171001  12571.13    354.24  12216.89  46094.79 145441.35
172001  12277.76    325.23  11952.54  41480.40 142292.29
173001   9062.63    350.17   8712.46  43812.65 103657.10
174002   7672.93    360.43   7312.51  42299.58  86993.39
175001  10178.94    283.47   9895.47  31239.53 117764.05
180001   7504.22    285.25   7218.98  32337.32  85857.68
平均値:    6528.02    160.19   6367.83  20292.68  81703.36


I/O と転送レートの統計情報をレポートする。

% sar -b
Linux 2.6.32-220.7.1.el6.x86_64 (u0.local) 	20120624 	_x86_64_	(4 CPU)

000001       tps      rtps      wtps   bread/s   bwrtn/s
001001      0.32      0.00      0.32      0.00      3.44
002001      0.48      0.00      0.48      0.00      5.27
003001      0.54      0.00      0.54      0.01      6.55
004001      0.94      0.03      0.91      2.72     13.04
005001      1.05      0.17      0.88      5.27     12.09
010001     15.45      0.08     15.37      1.85   9811.83
011001     70.83      1.98     68.85    241.32  49117.37
012001     80.15     10.89     69.26   1320.65  49387.93
013002    126.18     60.82     65.36   8477.76  46567.38
014002    168.68    130.04     38.64  16655.19  31507.04
015001      6.99      4.90      2.08    600.77   1308.01
020002     10.11      6.58      3.54    292.72   1150.70
145001     21.62     19.99      1.63   1006.65     69.88
150001      0.42      0.13      0.29      8.95      4.09
151001  10004.64    177.65   9826.99  42004.43 117453.81
152001   2001.81     25.88   1975.93   5628.56  23533.45
153001  13486.82     81.55  13405.26  12086.01 159768.32
154001  13722.57    244.02  13478.55  28738.31 160679.06
155002  13362.22    206.39  13155.83  27527.00 156462.05
160001  13539.63    293.36  13246.27  40582.62 158192.00
161001  13241.42    343.38  12898.04  43754.29 153699.72
162001  13534.87    241.10  13293.77  28409.26 158433.67
163001  13386.54    310.78  13075.76  40846.06 155826.46
164001  13528.30    269.68  13258.62  31964.65 158005.86
165001  13401.86    317.81  13084.05  36658.60 155921.78
170001  13352.84    366.47  12986.37  38840.10 154739.99
171001  12571.13    354.24  12216.89  46094.79 145441.35
172001  12277.76    325.23  11952.54  41480.40 142292.29
173001   9062.63    350.17   8712.46  43812.65 103657.10
174002   7672.93    360.43   7312.51  42299.58  86993.39
175001  10178.94    283.47   9895.47  31239.53 117764.05
180001   7504.22    285.25   7218.98  32337.32  85857.68
平均値:    6528.02    160.19   6367.83  20292.68  81703.36

ページングの統計
sar -B

メモリの利用状況統計
sar -r

swap の統計情報
swap in, swap out
sar -W

デバイスの統計情報を確認する。
sar -n DEV

ソケットの統計情報を確認する。
sar -n SOCK

関連ページ


[2012-06-25-1] CentOS mpstat コマンド
参照しているページ (サイト内): [2012-06-25-1]

スポンサーリンク
スポンサーリンク
 
いつもシェア、ありがとうございます!


もっと情報を探しませんか?

関連記事

最近の記事

人気のページ

スポンサーリンク
 

過去ログ

2020 : 01 02 03 04 05 06 07 08 09 10 11 12
2019 : 01 02 03 04 05 06 07 08 09 10 11 12
2018 : 01 02 03 04 05 06 07 08 09 10 11 12
2017 : 01 02 03 04 05 06 07 08 09 10 11 12
2016 : 01 02 03 04 05 06 07 08 09 10 11 12
2015 : 01 02 03 04 05 06 07 08 09 10 11 12
2014 : 01 02 03 04 05 06 07 08 09 10 11 12
2013 : 01 02 03 04 05 06 07 08 09 10 11 12
2012 : 01 02 03 04 05 06 07 08 09 10 11 12
2011 : 01 02 03 04 05 06 07 08 09 10 11 12
2010 : 01 02 03 04 05 06 07 08 09 10 11 12
2009 : 01 02 03 04 05 06 07 08 09 10 11 12
2008 : 01 02 03 04 05 06 07 08 09 10 11 12
2007 : 01 02 03 04 05 06 07 08 09 10 11 12
2006 : 01 02 03 04 05 06 07 08 09 10 11 12
2005 : 01 02 03 04 05 06 07 08 09 10 11 12
2004 : 01 02 03 04 05 06 07 08 09 10 11 12
2003 : 01 02 03 04 05 06 07 08 09 10 11 12

サイト

Vim入門

C言語入門

C++入門

JavaScript/Node.js入門

Python入門

FreeBSD入門

Ubuntu入門

セキュリティ入門

パソコン自作入門

ブログ

トップ


プライバシーポリシー