トップページ » Solaris10 Zone機能 » zonecfgコマンドでzoneにプール(pool)を割り当てる
カテゴリー
My Yahoo!に追加
Sun社提供情報
Solarisパッケージダウンロード
Sunマシンは買うには
blogs.sun.com
お勧めサイト
プライベートリンク

zonecfgコマンドでzoneにプール(pool)を割り当てる

【検証環境】
# more /etc/release
                         Solaris 10 3/05 s10_74L2a SPARC
           Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                            Assembled 22 January 2005

zonecfgコマンドで以下のようにpoolを割り当てることができる。既にインストールされたゾーンに割り当てるときは設定後にゾーンの再起動が必 要。

# zonecfg -z zone1
zonecfg:zone1> set pool=zone1-pool
zonecfg:zone1> exit

以下のように設定を確認する。

# cat /etc/zones/zone1.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE zone PUBLIC "-//Sun Microsystems Inc//DTD Zones//EN" "file:///usr/share/lib/xml/dtd/zonecfg.dtd.1">
<!--
    DO NOT EDIT THIS FILE.  Use zonecfg(1M) instead.
-->
<zone name="zone1" zonepath="/export/zone1" autoboot="true" pool="zone1-pool">
  <inherited-pkg-dir directory="/lib"/>
  <inherited-pkg-dir directory="/platform"/>
  <inherited-pkg-dir directory="/sbin"/>
  <inherited-pkg-dir directory="/usr"/>
  <network address="192.168.110.101" physical="qfe0"/>
  <filesystem special="/opt/zone1" directory="/usr/local" type="lofs"/>
  <rctl name="zone.cpu-shares">
    <rctl-value priv="privileged" limit="20" action="none"/>
  </rctl>
</zone>

zone1をリブートしzone1にログインして使っているCPUを確認してみる。
まず、グローバルゾーンでのpooladmとmpstatの結果をみる。

# pooladm

system domain-a
        string  system.comment
        int     system.version 1
        boolean system.bind-default true
        int     system.poold.pid 12948

        pool zone1-pool
                int     pool.sys_id 1
                boolean pool.active true
                boolean pool.default false
                int     pool.importance 1
                string  pool.comment
                pset    zone1-pset

        pool pool_default
                int     pool.sys_id 0
                boolean pool.active true
                boolean pool.default true
                int     pool.importance 1
                string  pool.comment
                pset    pset_default

        pset zone1-pset
                int     pset.sys_id 1
                boolean pset.default false
                uint    pset.min 1
                uint    pset.max 3
                string  pset.units population
                uint    pset.load 0
                uint    pset.size 3
                string  pset.comment

                cpu
                        int     cpu.sys_id 1
                        string  cpu.comment
                        string  cpu.status on-line

                cpu
                        int     cpu.sys_id 0
                        string  cpu.comment
                        string  cpu.status on-line

                cpu
                        int     cpu.sys_id 2
                        string  cpu.comment
                        string  cpu.status on-line

        pset pset_default
                int     pset.sys_id -1
                boolean pset.default true
                uint    pset.min 1
                uint    pset.max 65536
                string  pset.units population
                uint    pset.load 11
                uint    pset.size 1
                string  pset.comment

                cpu
                        int     cpu.sys_id 3
                        string  cpu.comment
                        string  cpu.status on-line
# mpstat
CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  wt idl
  0    1   0  906   603  502   35    0    3    1    0    10    3   0   0  97
  1    0   0    2   305  301   14    0    1    0    0     8    3   0   0  97
  2    1   0    3   305  301   58    1    5    1    0    14    3   0   0  97
  3    1   0    3   307  301   92    2    7    1    0    21    3   1   0  97

上記結果からzone1-pool は zone1-pset に紐付けられていて zone1-pset は現時点で 3つのCPUを持っていることがわかる。
また、以下のようにzone1でも同様にコマンドを実行してみた。
設定通り、zone1-poolを利用しているためCPUは割り当てられている3つだけしか表示されない。pooladmコマンドでも割り当てられている プール(zone1-pool)とプロセッサセット(zone1-pset)の情報しか表示されないことがわかる。

# zlogin zone1
[ゾーン 'zone1' pts/4 に接続されました]
Last login: Wed Mar 16 16:20:21 on pts/4
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
zone1#
zone1# mpstat
CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  wt idl
  0    1   0  906   603  502   35    0    3    1    0    10    3   0   0  97
  1    0   0    2   305  301   14    0    1    0    0     8    3   0   0  97
  2    1   0    3   305  301   58    1    5    1    0    14    3   0   0  97

zone1# pooladm

system domain-a
        string  system.comment
        int     system.version 1
        boolean system.bind-default true
        int     system.poold.pid 12948

        pool zone1-pool
                int     pool.sys_id 1
                boolean pool.active true
                boolean pool.default false
                int     pool.importance 1
                string  pool.comment
                pset    zone1-pset

        pset zone1-pset
                int     pset.sys_id 1
                boolean pset.default false
                uint    pset.min 1
                uint    pset.max 3
                string  pset.units population
                uint    pset.load 0
                uint    pset.size 3
                string  pset.comment

                cpu
                        int     cpu.sys_id 1
                        string  cpu.comment
                        string  cpu.status on-line

                cpu
                        int     cpu.sys_id 0
                        string  cpu.comment
                        string  cpu.status on-line

                cpu
                        int     cpu.sys_id 2
                        string  cpu.comment
                        string  cpu.status on-line

Solaris10 Zone機能のその他のリンク

Solaris系技術トレーニング一覧

Solaris10システム管理基本コース
Solaris10ネットワーク・インターネットサーバー管理コース
セキュリティ・パフォーマンス管理・トラブルシューティング等
Sun Cluster、ボリューム管理ソフトウェア
仮想化技術全般
シンクライアント、SunRay、デスクトップソフトウェア
アイデンティティマネージメントサービス
アプリケーションサーバーとWebポータル
サーバー(ハードウェア)メンテナンス
Sun Java CAPS
MySQL

コメント

aHbu4k rqyplmwnfswc, [url=http://vfoebqtzmnul.com/]vfoebqtzmnul[/url], [link=http://qbynzarinqng.com/]qbynzarinqng[/link], http://eudpbljjhelw.com/

Posted by: wdywjc : 2010年01月22日 18:57

Px1ttm ydqgtwtpcihw, [url=http://cojjfuipjqaz.com/]cojjfuipjqaz[/url], [link=http://weuxwxamltie.com/]weuxwxamltie[/link], http://ipgtwstxpyfh.com/

Posted by: imbmqysown : 2010年02月25日 14:14

[URL=http://qzbifwqw.com]pmjsyknd[/URL] gyadsalv http://ggckkfon.com jqfjnvso pvdybssr ckseyvht

Posted by: korqcuir : 2010年04月08日 00:50
コメントする









名前、アドレスを登録しますか?