2015年10月22日木曜日

Arch Linux に sar, vmstat コマンドをインストールする。

Arch Linux では、標準では sar コマンドも iostat コマンドもインストールされていない。

$ sar
bash: sar: command not found
$ iostat
bash: iostat: command not found

両コマンドを使えるようにするには、sysstat をインストールする。

pacman -Ss コマンドでパッケージを検索する。
$ sudo pacman -Ss sysstat
community/libsysstat 0.3.0-1
    Library to query system statistics (net, resource usage, ...)
community/sysstat 11.1.3-1
    a collection of performance monitoring tools (iostat,isag,mpstat,pidstat,sadf,sar)
pacman -S コマンドでインストール。
$ sudo pacman -S sysstat
[sudo] password for ******: 
resolving dependencies...
looking for conflicting packages...

Packages (1) sysstat-11.1.3-1

Total Download Size:   0.26 MiB
Total Installed Size:  1.40 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages ...
 sysstat-11.1.3-1-x86_64                                                                                              268.0 KiB   487K/s 00:01 [########################################################################################] 100%
(1/1) checking keys in keyring                                                                                                                 [########################################################################################] 100%
(1/1) checking package integrity                                                                                                               [########################################################################################] 100%
(1/1) loading package files                                                                                                                    [########################################################################################] 100%
(1/1) checking for file conflicts                                                                                                              [########################################################################################] 100%
(1/1) checking available disk space                                                                                                            [########################################################################################] 100%
(1/1) installing sysstat                                                                                                                       [########################################################################################] 100%
Optional dependencies for sysstat
    tk: to use isag
    gnuplot: to use isag