Oracle Solaris のシステム管理 (Oracle Solaris コンテナ : 資源管理と Oracle Solaris ゾーン)

Procedureプロジェクトを定義して現在のプロジェクトを表示する方法

次の例は、projadd コマンドを使用してプロジェクトエントリを追加し、projmod コマンドを使用してそのエントリを変更する方法を示します。

  1. スーパーユーザーになるか、同等の役割を引き受けます。

    役割には、認証と特権コマンドが含まれます。役割の詳細については、『Solaris のシステム管理 (基本編)』「Solaris 管理ツールを RBAC と組み合わせて使用する (作業マップ)」を参照してください。

  2. projects -l を使用して、システムのデフォルトの /etc/project ファイルを表示します。


    # projects -l
    system:0::::
    user.root:1::::
    noproject:2::::
    default:3::::
    group.staff:10::::system
            projid : 0
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    user.root
            projid : 1
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    noproject
            projid : 2
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    default
            projid : 3
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    group.staff
            projid : 10
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
  3. booksite という名前のプロジェクトを追加します。追加したプロジェクトを mark という名前のユーザーにプロジェクト ID 番号 4113 で割り当てます。


    # projadd -U mark -p 4113 booksite
    
  4. 再度 /etc/project ファイルを表示します。


    # projects -l
    system
            projid : 0
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    user.root
            projid : 1
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    noproject
            projid : 2
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    default
            projid : 3
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    group.staff
            projid : 10
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    booksite
            projid : 4113
            comment: ""
            users  : mark
            groups : (none)
            attribs: 
  5. comment フィールドにプロジェクトを説明するコメントを追加します。


    # projmod -c `Book Auction Project' booksite
    
  6. /etc/project ファイルに加えた変更を確認します。


    # projects -l
    system
            projid : 0
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    user.root
            projid : 1
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    noproject
            projid : 2
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    default
            projid : 3
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    group.staff
            projid : 10
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    booksite
            projid : 4113
            comment: "Book Auction Project"
            users  : mark
            groups : (none)
            attribs: 
参照

プロジェクト、タスク、およびプロセスをプールに結合する方法については、「プール属性の設定とプールへの結合」を参照してください。