「virsh list --all」を連発しても良いのですが、簡単に分かれば便利です。
Xenにはxentopがありますが、KVMで相当するものはありません(たぶん)
そこで「virt-top」を使ってみます。
■導入
当環境はCentOS5.5で、すでにKVMで仮想OSが動いています。
RPM SEARCHで、「virt-top」を検索します。
見つかったところで、rpmをダウンロードします。
今回導入したのは「virt-top-1.0.4-3.1.el5.x86_64.rpm」
普通に「rpm -ivh~」や「rpm -Uvh~」で導入します。
■使い方
「virt-top」で起動します。topコマンドライクに稼動状況を表示します。
「--help」オプションをつけて起動すれば使い方が表示されます。
- # virt-top --help
- virt-top : a 'top'-like utility for virtualization
- SUMMARY
- virt-top [-options]
- OPTIONS
- -1 Start by displaying pCPUs (default: tasks)
- -2 Start by displaying network interfaces
- -3 Start by displaying block devices
- -b Batch mode
- -c uri Connect to URI (default: Xen)
- --connect uri Connect to URI (default: Xen)
- --csv file Log statistics to CSV file
- --no-csv-cpu Disable CPU stats in CSV
- --no-csv-block Disable block device stats in CSV
- --no-csv-net Disable net stats in CSV
- -d delay Delay time interval (seconds)
- --debug file Send debug messages to file
- --end-time time Exit at given time
- --hist-cpu secs Historical CPU delay
- --init-file file Set name of init file
- --no-init-file Do not read init file
- -n iterations Number of iterations to run
- -o sort Set sort order (cpu|mem|time|id|name)
- -s Secure ("kiosk") mode
- --script Run from a script (no user interface)
- -help Display this list of options
- --help Display this list of options
表示イメージ
- virt-top 11:28:24 - x86_64 2/2CPU 2094MHz 3941MB
- 13 domains, 1 active, 1 running, 0 sleeping, 0 paused, 12 inactive D:0 O:0 X:0
- CPU: 51.1% Mem: 1024 MB (1024 MB by guests)
- ID S RDRQ WRRQ RXBY TXBY %CPU %MEM TIME NAME
- 1 R 51.1 25.0 1:22.13 vm01
- - (vm02)
- - (vm03)
- - (vm04)
- - (vm05)
- - (vm06)
- - (vm07)
- - (vm08)
- - (vm09)
- - (vm10)
- - (vm11)
- - (vm12)
- - (vm13)
手っ取り早く稼動状況を知りたい場合に入れておくと便利ではないでしょうか
0 件のコメント:
コメントを投稿