Sun N1 Grid Engine 6.1 インストールガイド

第 8 章 アカウンティングおよびレポートコンソールのインストール

この章では、アカウンティングおよびレポートコンソールソフトウェア (ARCo) のインストール手順について説明します。

データベースソフトウェアの設定

アカウンティングおよびレポートコンソールをインストールし、使用するためには、事前にデータベースソフトウェアをインストールし、適切に構成する必要があります。この節では、PostgreSQL データベース、MySQL データベース、または Oracle データベースを使ってデータベースソフトを設定する方法について説明します。

N1 Grid Engine での PostgreSQL データベースソフトウェアの使用

PostgreSQL データベースソフトウェアの詳細は、Postgres のマニュアルを参照してください。

Procedureデータベースサーバーを起動する方法

PostgreSQL ソフトウェアのインストール後、データベースサーバーを起動できます。

始める前に

PostgreSQL データベースソフトウェアをダウンロードし、コンパイルし、インストールします。データベースプロセスの所有者になるユーザーを作成します。通常、このユーザーは postgres です。環境に、PostgreSQL bin ディレクトリと必要な LD_LIBRARY_PATH 設定を追加します。

  1. postgres ユーザーのホームディレクトリを作成します。

    この例では、ホームディレクトリは /space/postgres/data になります。


    % mkdir -p /space/postgres/data
    % useradd -d /space/postgres  postgres 
    % chown postgres /space/postgres/data
    % su - postgres
    
  2. PostgreSQL のマニュアルの説明に従って、データベースの設定を続行します。


    > initdb -D /space/postgres/data
    
    creating directory /space/postgres/data... ok
    creating directory /space/postgres/data/base... ok
    creating directory /space/postgres/data/global... ok
    creating directory /space/postgres/data/pg_xlog... ok
    creating directory /space/postgres/data/pg_clog... ok
    creating template1 database in /space/postgres/data/base/1... ok
    creating configuration files... ok
    initializing pg_shadow... ok
    enabling unlimited row size for system tables... ok
    initializing pg_depend... ok
    creating system views... ok
    loading pg_description... ok
    creating conversions... ok
    setting privileges on built-in objects... ok
    vacuuming database template1... ok
    copying template1 to template0... ok
    
    Success. You can now start the database server using:
       postmaster -D /space/postgres/data
       or
       pg_ctl -D /space/postgres/data -l logfile start
  3. pg_hba.conf ファイルに、次のような変更を加えます。

    その結果、データベースのスーパーユーザー postgres に、パスワード不要の無制限のアクセス権が付与されます。そして、その他のデータベースユーザーには、md5 暗号パスワードの使用が義務付けられます。末尾の 0 を除く nnn.nnn.nnn の部分は、実際のサブネットアドレスで置き換えます。また、ホスト IP アドレスに同様の行を追加して、ホスト単位でアクセス規則を追加することもできます。

    # TYPE  DATABASE  USER  IP-ADDRESS     IP-MASK         METHOD
    local   all       postgres                             trust
    local   all       all                                  md5
    # IPv4-style local connections:
    #host    all       all   nnn.nnn.nnn.0  255.255.255.0  md5
    
  4. postgresql.conf ファイルに次の変更を加えることにより、ほかのホストからの TCP/IP アクセスを有効にします。


    注 –

    shared_buffers の値が max_connections の値の 2 倍以上であることを確認します。


    tcpip_socket = true
    max_connections = 40   (increase if necessary)
  5. データベースを起動します。

    この例の -i は TCP/IP 通信、-S はサイレントモードを有効にします。


    > postmaster -S -i
    
  6. インストールを検証します。

    postgres ユーザーになり、次のコマンドを実行します。


    % su - postgres
    
    > createuser -P test_user
    Enter password for new user: 
    Enter it again: 
    Shall the new user be allowed to create databases? (y/n) y
    Shall the new user be allowed to create more new users? (y/n) n
    CREATE USER
    
    > createdb -O test_user -E UNICODE test
    CREATE DATABASE
  7. データベースのスーパーユーザーになり、コマンドを実行します。


     > psql test
    Welcome to psql 7.3, the PostgreSQL interactive terminal.
    Type:  \copyright for distribution terms
           \h for help with SQL commands
           \? for help on internal slash commands
           \g or terminate with semicolon to execute query
           \q to quit
           

    test=# create table test (x int, y text);
    CREATE TABLE
    test=# insert into test values (1, 'one');
    INSERT 16982 1
    test=# insert into test values (2, 'two');
    INSERT 16983 1
    test=# select * from test;
    x |  y
    ---+------
    1 | one
    2 | two
    (2 rows)
    
    test=# \q
    
     > psql -U test_user test
    Password: 
    Welcome to psql 7.4.1, the PostgreSQL interactive terminal.
    
    Type:  \copyright for distribution terms
           \h for help with SQL commands
           \? for help on internal slash commands
           \g or terminate with semicolon to execute query
           \q to quit
    test=> 
  8. データベースのテストが正常に完了したら、次のタスク、「PostgreSQL データベースを設定する方法」に進みます。

ProcedurePostgreSQL データベースを設定する方法

  1. データベースのスーパーユーザー、たとえば postgres としてログインします。


    # su - postgres
    
  2. データベースの所有者を作成します。


    > createuser -P arco_write
    Enter password for new user: 
    Enter it again: 
    Shall the new user be allowed to create databases? (y/n) y
    Shall the new user be allowed to create more new users? (y/n) n
    CREATE USER
  3. アカウンティングおよびレポート用のデータベースを作成します。


    > createdb -O arco_write arco
    CREATE DATABASE
  4. データベースを読み取るためのデータベースユーザーを作成します。

    arco_read ユーザーを使用しない場合、次の手順で使用する特権スクリプトの内容を修正する必要があります。


    > createuser -P arco_read
    Enter password for new user: 
    Enter it again: 
    Shall the new user be allowed to create databases? (y/n) n
    Shall the new user be allowed to create more new users? (y/n) n
    CREATE USER

N1 Grid Engine での Oracle データベースソフトウェアの使用

ProcedureOracle データベースを設定する方法

  1. データベース管理者に、Oracle データベースのインスタンスについて問い合わせます。

    このインスタンスは、データベースユーザー arco_writearco_read を必要とします。arco_write ユーザーには、テーブル、ビュー、インデックスを作成または変更する特権が付与されます。arco_read ユーザーの特権は、あとで SQL スクリプトによって設定されます。

  2. データベース管理者に、データベースの接続文字列を問い合わせます。

N1 Grid Engine での MySQL データベースソフトウェアの使用

アカウンティングおよびレポートコンソールではビューが使用されるため、コンソールでは MySQL データベースのバージョン 5.0.x 以上がサポートされています。MySQL データベースソフトウェアの詳細については、MySQL のマニュアル を参照してください。

MySQL データベースでの大文字と小文字の区別

MySQL では、データベースはデータディレクトリ内のディレクトリに対応しています。データベース内の各テーブルは、データベースディレクトリ内の 1 つ以上のファイルに対応しています。その結果、基礎となっているオペレーティングシステムで大文字と小文字が区別されるかどうかによって、データベース名とテーブル名で大文字と小文字が区別されるかどうかが決まります。したがって、ほとんどの種類の UNIX ではデータベース名とテーブル名で大文字と小文字が区別され、Windows では区別されません。

ProcedureUNIX システムに MySQL データベースをインストールする方法

  1. システムに応じた MySQL ソフトウェアを、http://www.mysql.com からダウンロードします。

    UNIX システムでの標準インストールディレクトリは /usr/local/mysql です。これとは異なるディレクトリにソフトウェアをインストールするには、パッケージに付属するスクリプトを変更する必要があります。


    注 –

    ARCo は Java Web ベースのアプリケーションであり、JDBC コールを MySQL データベースで使用されるネットワークプロトコルに変換するために、 JavaTM データベース接続 (JDBCTM) ドライバが必要です。JDBC ドライバは http://www.mysql.com/products/connector からダウンロードできます。


  2. インストールディレクトリから mysql へのシンボリックリンクを作成します。


    # ln -s $installation_directory/mysql-standard-5.0.26-solaris10-i386 mysql

    mysql ディレクトリには、いくつかのファイルとサブディレクトリがあります。

    • bin サブディレクトリには、クライアントプログラムとサーバーがあります。

      • MySQL サーバーおよびサーバー起動スクリプト。

        • mysqld は MySQL サーバーです。

        • mysqld_safemysql.server、および mysqld_multi はサーバー起動スクリプトです。

        • mysql_install_db では、データディレクトリと初期データベースが初期化されます。

        • mysqlmanager は MySQL インスタンスマネージャーです。

      • サーバーにアクセスするクライアントプログラム。

        • mysql は、SQL 文を対話的またはバッチモードで実行するためのコマンド行クライアントです。

        • mysqladmin は管理用クライアントです。

        • mysqlcheck では、テーブルの保守動作が実行されます。

        • mysqldump および mysqlhotcopy では、データベースのバックアップが作成されます。

        • mysqlimport では、データベースファイルがインポートされます。

        • mysqlshow では、データベースとテーブルに関する情報が表示されます。

      • サーバーから独立して動作するユーティリティープログラム。

        • myisamchk では、テーブルの保守動作が実行されます。

        • myisampack では、圧縮された読み取り専用のテーブルが作成されます。

        • mysqlbinlog は、バイナリのログファイルを処理するためのツールです。

        • perror では、エラーコードの意味が表示されます。

    • scripts サブディレクトリには、サーバーのアクセス権が格納された付与テーブルを含んだ mysql データベースの初期化に使用される mysql_install_db スクリプトがあります。

  3. mysqld のログインユーザーとグループを追加します。


    # groupadd mysql
    # useradd -g mysql mysql
  4. プログラムのバイナリの所有者を root に変更し、データディレクトリの所有者は mysqld の実行に使用するユーザーにします。


    # chown -R root .
    # chown -R mysql data
    # chgrp -R mysql .
  5. MySQL の付与テーブルを作成します。


    # scripts/mysql_install_db --user=mysql
  6. MySQL サーバーを起動します。


    # bin/mysqld_safe --user=mysql &
  7. root のパスワードを指定します。


    # ./bin/mysqladmin -u root password 'new-password'
    # ./bin/mysqladmin -u root -h ${hostname} password 'new-password'
MySQL インストールのヒント

ProcedureMySQL でアカウンティングおよびレポートデータベースを設定する方法

  1. データベースにスーパーユーザーでログインします。

    # mysql -u root -p<password>
  2. ユーザーを作成し、arco_read および arco_write の権限を与えます。

    mysql> GRANT ALL on *.* to 'arco_write'@'<hostname>' identified by '<password>' with GRANT OPTION;
    mysql> GRANT ALL on *.* to 'arco_write'@'localhost' identified by '<password>' with GRANT OPTION;
    mysql> GRANT ALL on *.* to 'arco_write'@'%' identified by '<password>' with GRANT OPTION;
    
    mysql> GRANT SELECT,SHOW VIEW on <db_name>.* to 'arco_read'@'<hostname>' identified by '<password>';
    mysql> GRANT SELECT,SHOW VIEW on <db_name>.* to 'arco_read'@'localhost' identified by '<password>';
    mysql> GRANT SELECT,SHOW VIEW on <db_name>.* to 'arco_read'@'%' identified by '<password>';
  3. データベースに arco_write ユーザーでログインします。

    # mysql -u arco_write -p<password>
  4. アカウンティングおよびレポートデータベースを作成します。

    mysql> CREATE DATABASE ARCO;
  5. アカウンティングおよびレポートソフトウェアをインストールします。

アカウンティングおよびレポートソフトウェアのインストール

ProceduredbWriter を設定する方法

  1. tar 方式または pkgadd 方式を使用して、アカウンティングおよびレポートソフトウェアを展開します。

    • tar 方式


      # cd sge-root
      

      次のコマンドを 1 行で入力します。-dc と tar ファイルのパスの間には空白文字を 1 つ入力します。


      # gunzip -dc 
      cdrom-mount-point/N1_Grid_Engine_6_1/ARCo/tar/n1ge-6_0-arco-1_0.tar.gz | tar xvpf -
      
    • pkgadd 方式

      コマンドプロンプトに次のコマンドを入力し、各質問に回答します。


      # cd cdrom_mount_point/N1_Grid_Engine_6_1/ARCo/Packages
      # pkgadd -d . SUNWsgeea
      
  2. 管理ユーザーになり、環境変数を設定します。

    • Bourne シェルまたは Korn シェルを使用している場合、次のコマンドを入力します。


      $ . sge-root/default/common/settings.sh
      
    • C シェルを使用している場合、次のコマンドを入力します。


      % source sge-root/default/common/settings.csh
      
  3. レポート機能が有効になるように、グローバル構成を変更します。

    レポート機能を有効にする方法の詳細は、『Sun N1 Grid Engine 6.1 管理ガイド』「レポート統計 (ARCo)」を参照してください。


    % qconf -mconf
    <......>
    reporting_params    accounting=true \
     reporting=true flush_time=00:00:15 joblog=true \
     sharelog=00:00:00<......>
    

    デフォルトでは、レポート変数は一切アクティブになりません。特定の変数で統計情報の収集を有効にする場合は、次の例のように qconf コマンドを使用します。


    % qconf -me global
    hostname              global
    <......>
    report_variables      cpu,np_load_avg,mem_free,virtual_free
    <......>
  4. dbWriter ソフトウェアをインストールします。


    注 –

    dbwriter ソフトウェアはユーザー root でインストールする必要があります。



    # cd sge-root/dbwriter
    % cd sge-root/dbwriter
    % su
    password:
    # ./inst_dbwriter
    # ./inst_dbwriter
    
    Welcome to the GE installation
    ---------------------------------------
    
    GE dbWriter installation
    ---------------------------------
    The dbWriter installation will take approximately 5 minutes
    
    Hit <RETURN> to continue >> 
  5. sge-root の場所と、セル名を指定します。


    Hit <RETURN> to continue >> 
    
    Checking $SGE_ROOT directory
    ----------------------------
    
    The GE root directory is:
    
       $SGE_ROOT = /opt/n1ge6
    
    If this directory is not correct (e.g. it may contain an automounter
    prefix) enter the correct path to this directory or hit <RETURN>
    to use default [/opt/n1ge6] >> 
    
    Your $SGE_ROOT directory: /opt/n1ge6
    
    Hit <RETURN> to continue >> 
    
    GE cells
    -----------------
    
    GE supports multiple cells.
    
    If you are not planning to run multiple GE clusters or if you don't
    know yet what is a GE cell it is safe to keep the default cell name
    
       default
    
    If you want to install multiple cells you can enter a cell name now.
    
    The environment variable
    
       $SGE_CELL=<your_cell_name>
    
    will be set for all further GE commands.
    
    Enter cell name [default] >> 
    
    Using cell >default<. 
    Hit <RETURN> to continue >> 
  6. Java Software Development Kit の場所を指定します。

    バージョン 1.4.2 以降を指定する必要があります。JAVA_HOME 環境変数が設定されている場合、スクリプトはその値をデフォルト値として使用します。


    Please enter the path to your java 1.4 installation [/usr/java] >>/opt/j2sdk1.4.2_06
    
  7. レポートデータベースの接続パラメータを指定します。


    Setup your database connection parameters
    -----------------------------------------
    
    Enter your database type ( o = Oracle, p = PostgreSQL, m = MySQL ) [] >> p
    
    Please enter the name of your postgres db host []>> my-host.my-domain
    
    Please enter the port of your postgres db [5432] >>
    
    Please enter the name of your postgres database [arco] >> 
  8. データベースユーザーのユーザー名とパスワードを入力します。


    Please enter the name of the database user [arco_write] >> 
    
    Please enter the password of the database user >> 
    Please retype the password >> 
  9. データベーススキーマの名前を入力します。

    • JDBC ドライバが検出された場合、スキーマ名の入力を求められます。

      PostgreSQL の場合は、通常、public と入力します。Oracle の場合は、この値をデータベースの所有者のユーザー名 (arco_write) にします。


      Please enter the name of the database schema [public] >> 
      
      Search for the jdbc driver org.postgresql.Driver 
      in directory /opt/n1ge6/dbwriter/lib ..........
      found in /opt/n1ge6/dbwriter/lib/pg73jdbc2.jar
      
      OK, jdbc driver found
    • 対応する JDBC ドライバが見つからない場合、データベースドライバの JAR ファイルを sge-root/dbwriter/lib ディレクトリにコピーするように求められます。


      注 –

      PostgresSQL の JDBC ドライバは、インストール時に指定されます。ARCo ソフトウェアを Oracle または MySQL にインストールした場合は、正しい JDBC ドライバを $SGE_ROOT/dbwriter/lib ディレクトリにコピーする必要があります。


      JAR ファイルを適切な場所にコピーしたら、RETURN キーを押します。すると、再度検索が行われます。


      Error: jdbc driver org.postgresql.Driver
             not found in any jar file of directory
             /opt/n1ge6/dbwriter/lib
      
      Please copy a jdbc driver for your database into
      this directory!
      
      Press enter to continue >>
  10. データベースが正しく設定されていることを確認します。


    Should the connection to the database be tested? (y/n) [y] >> 
    • テストに成功した場合、次の内容が出力されます。


      Test db connection to 'jdbc:postgresql://my-host.my-domain:5432/arco' ... OK
    • テストに失敗した場合、設定手続きを再度行うかどうかを確認するプロンプトが表示されます。


      Test db connection to 'jdbc:postgresql://my-host.my-domain:5432/arco' ... Failed
      Do you want to repeat database connection setup? (y/n) [y] >>
  11. データベースモデルを初期化またはアップグレードします。

    次の処理中に、データベーステーブルが作成または更新されます。ユーザー arco_read には、データベーステーブルへの限定されたアクセス権が付与されます。ARCo Web アプリケーションは、user arco_read ユーザーを使用してデータベースに接続します。


    Query db version ... no sge tables found
    New version of the database model is needed
    
    Should the database model be upgraded to version 1? (y/n) [y] >> 
    
    
    The ARCo web application connects to the database
    with a user which has restricted access.
    The name of this database user is needed to grant
    the user access to the sge tables.
    
    Please enter the name of this database user [arco_read] >> 
    Upgrade to database model version 1 ... Install version 6.0 (id=0) -------
    Create table sge_job
    Create index sge_job_idx0
    Create index sge_job_idx1
    create table sge_job_usage
    Create table sge_job_log
    Create table sge_job_request
    Create table sge_job_request
    Create table sge_queue
    Create index sge_queue_idx0
    Create table sge_queue_values
    Create index sge_queue_values_idx0
    Create table sge_host
    Create index sge_host_idx0
    Create table sge_host_values
    Create index sge_host_values_idx0
    Create table sge_department
    Create index sge_department_idx0
    Create table sge_department_values
    Create index sge_department_values_idx0
    Create table sge_project
    Create index sge_project_idx0
    Create table sge_project_values
    Create index sge_project_values_idx0
    Create table sge_user
    Create table sge_user_values
    Create index sge_user_values_idx0
    Create table sge_group
    Create index sge_group_idx0
    Create table sge_group_values
    Create index sge_group_values_idx0
    Create table sge_share_log
    Create view view_accounting
    Create view view_job_times
    Create view view_jobs_completed
    Create view view_job_log
    Create view view_department_values
    Create view view_group_values
    Create view_host_values
    Create view view_project_values
    Create view view_queue_values
    Create view view_user_values
    committing changes
    version 6.0 (id=0) successfully installed
    Install version 6.0u1 (id=1) -------
    Create table sge_version
    Update view view_job_times
    Update version table
    committing changes
    version 6.0u1 (id=1) successfully installed
    OK
  12. dbWriter プログラムが N1 Grid Engine ログファイルの新規データをチェックする頻度を指定します。


    Please enter the interval between two dbwriter runs in seconds [60] >> 
  13. dbwriter 用のスプールディレクトリを指定します。

    dbwriter のログファイルがこのディレクトリに格納されます。dbwriter のプロセスの起動時に、このディレクトリにある dbwriter.pid ファイルに pid が書き込まれます。


    Please enter the path of the dbwriter spool directory [$SGE_ROOT/$SGE_CELL/spool/dbwriter]>>
  14. 派生値の計算規則が格納されているファイルの場所を入力します。

    dbWriter プログラムは、アカウンティングおよびレポートデータに基づいて、いくつかの派生値を計算します。派生値は、1 個以上の raw 値から計算される報告情報です。dbWriter プログラムでは、不要になったデータをレポートデータベースから削除することも可能です。派生値の計算とデータ削除に関する規則は、1 つのファイルに格納されています。dbWriter プログラムのディストリビューションには、PostgreSQL データベース用のサンプルファイルと Oracle データベース用のサンプルファイルが格納されています。サンプルファイルは、$SGE_ROOT/dbwriter/database/postgres/dbwriter.xml $SGE_ROOT/dbwriter/database/oracle/dbwriter.xml です。

    デフォルトのファイルの場所を使用するか、代替パスを指定します。


    Please enter the file with the derived value rules 
    [$SGE_ROOT/dbwriter/database/postgres/dbwriter.xml] >>
  15. dbWriter プログラムが使用するロギングのレベルを設定します。


    The dbWriter can run with different debug levels
    Possible values: WARNING INFO CONFIG FINE FINER FINEST
    Please enter the debug level of the dbwriter [INFO] >> 
  16. 設定を確認します。

    n と応答した場合、設定を再実行するどうかを確認するプロンプトが表示されます。


    All parameters are now collected
    --------------------------------
    
          SGE_ROOT=/opt/n1ge6
          SGE_CELL=default
         JAVA_HOME=/usr/java (java version "1.4.2")
            DB_URL=jdbc:postgresql://my-host.my-domain:5432/arco
           DB_USER=arco_write
          INTERVAL=60
    REPORTING_FILE=/opt/n1ge6/default/common/reporting
      DERIVED_FILE=/opt/n1ge6/dbwriter/database/postgres/dbwriter.xml
       DEBUG_LEVEL=INFO
    
    Are this settings correct? (y/n) [y] >> y
    

    インストールスクリプトにより、起動スクリプト sge-root/dbwriter/bin/sgedbwriter が作成されます。構成パラメータは sge-root/ cell/common/dbwriter.conf に格納されます。構成を変更する必要があるときは、dbwriter.conf ファイルを編集するか、インストールスクリプトを再実行します。


    Create configuration file for dbWriter in 
    /opt/n1ge6/default/common
  17. dbwriter 用にブート時間起動スクリプトをインストールするかどうかを選択します。


    dbwriter startup script
    -----------------------
    
    We can install the startup script that will
    start dbwriter at machine boot (y/n) [y] >> y
    Installing startup script /etc/rc2.d/S96sgedbwriter
    Installation of dbWriter completed
  18. dbWriter プログラムを起動します。


    # /etc/init.d/sgedbwriter start
    

ProcedureSun Java Web コンソールをインストールする方法

  1. Sun Java Web コンソールがシステムで使用可能かどうかを確認します。Solaris 10 ソフトウェアおよび Solaris 9 の新しいバージョンの場合は、通常は使用可能になっています。

    確認するには、root になり、次のコマンドを実行します。


    # smcwebserver -V 
    Version 2.2.1

    N1 Grid Engine 6.1 ソフトウェア用の ARCo には Sun Java Web Console 2.2. x が必要です。


    注 –

    N1 Grid Engine 6.1 ソフトウェア用の ARCo は Sun Java Web Console 3.0 以降をサポートしていません。


  2. コンソールをインストールする必要がある場合は、一時ディレクトリに Web コンソールパッケージを抽出します。


    # cd /tmp
    # umask 022
    # mkdir swc
    # cd swc
    

    次のコマンドを 1 行で入力します。xvftar ファイルのパスの間には空白文字を 1 つ入力します。


    # tar xvf 
    cdrom_mount_point/N1_Grid_Engine_6_1/SunWebConsole/tar/swc_sparc_2.2.1.tar
    
  3. パスワードファイルまたは NIS パスワードマップにユーザー noaccess およびグループ noaccess が存在しない場合、次のように入力して追加します。


    # groupadd -g 60002 noaccess
    # useradd -u 60002 -g 60002 -d /tmp -s /bin/sh -c "No Access User" noaccess
    

    注 –

    オペレーティングシステムによっては、/bin/csh をデフォルトシェルとして使用すると、インストールが失敗する場合があります。ARCo がインストールされず、エラーメッセージ「Server not started! No management applications registered」が表示される場合は、 noaccess のデフォルトシェルとして /bin/sh を設定してみてください。


  4. SuSE 9.0 を実行している場合は、各 /etc/rc#.d ディレクトリのシンボリックリンクを作成します。


    # ln -s /etc/rc.d/rc0.d /etc/rc0.d
    # ln -s /etc/rc.d/rc1.d /etc/rc1.d
    # ln -s /etc/rc.d/rc2.d /etc/rc2.d
    
  5. Sun Java Web コンソールの設定スクリプト setup を実行します。


    # ./setup -n
    <....>
    Installation complete.
    
    Starting Sun(TM) Web Console Version 2.2.1...
    See /var/log/webconsole/console_debug_log for server logging information

    Web コンソールがインストールされましたが、ARCo コンソールのインストールが完了するまで、Web コンソールは起動されません。コンソールのインストール後は、次のコマンドを使用してコンソールをいつでも停止、起動、または再起動できます。


    # /usr/sadm/bin/smcwebserver start
    # /usr/sadm/bin/smcwebserver stop
    # /usr/sadm/bin/smcwebserver restart

Procedureアカウンティングおよびレポートコンソールをインストールする方法

  1. sge-root/reporting ディレクトリに移動します。


    # cd sge-root/reporting
    
  2. inst_reporting スクリプトを使って、ソフトウェアをインストールします。


    # ./inst_reporting
    
    Welcome to the  GE ARCo reporting module installation
    ----------------------------------------------------
    The installation will take approximately 5 minutes
    
    Hit <RETURN> to continue >> 

    インストールスクリプトによって、SGE_ROOT ディレクトリおよび SGE_CELL 名の確認が行われます。すでにこれらのパラメータが作成されている場合は、スクリプトが続行されます。

  3. Java Software Development Kit のパスを入力します。

    バージョン 1.4.2 以降を指定する必要があります。JAVA_HOME 環境変数が設定されている場合、スクリプトはその値をデフォルト値として使用します。


    Please enter the path to your Java 1.4 installation [] >> /opt/j2sdk1.4.2_06
    
  4. アカウンティングおよびレポートソフトウェアの実行結果を格納するディレクトリを指定します。

    指定されたディレクトリが存在しない場合、自動的に作成されます。


    Spool directory
    ---------------
    
    In the spool directory the N1 SGE reporting module will
    store all queries and results
    
    Please enter the path to the spool directory [/var/spool/arco] >> 
  5. データベース接続のパラメータを指定します。


    Database Setup
    --------------
    
    Enter your database type ( o = Oracle, p = PostgreSQL ) [p] >> o
    
    
    Please enter the name of your oracle db host [] >> my-host
    
    Please enter the port of your oracle db [1521] >> 
    
    Please enter the name of your oracle database [arco] >> 
  6. アカウンティングおよびレポートデータベースユーザーを指定します。

    dbwriter アプリケーションと同じデータベースユーザーは指定できません。セキュリティー上の理由から、アカウンティングおよびレポートを行うデータベースユーザーには、データベーステーブルの読み取り権のみを付与してください。


    Please enter the name of the database user [arco_read] >> 
    
    Please enter the password of the database user >> 
    Please retype the password >> 
    
    Please enter the name of the database schema [arco_write] >> 
    
    Search for the jdbc driver oracle.jdbc.driver.OracleDriver 
    in directory /opt/n1ge/reporting/WEB-INF/lib ...
    found in /opt/n1ge/reporting/WEB-INF/lib/classes12.jar
    Should the connection to the database be tested? (y/n) [y] >> y
    
    Test db connection to 'jdbc:oracle:thin:@my-system:1521:arco' ... OK
    h150

    データベーススキーマの名前は、使用するデータベースによって異なります。PostgresSQL データベースでは、データベーススキーマ名は public にする必要があります。Oracle データベースでは、データベーススキーマ名は dbwriter (arco_write) で使用されるユーザーアカウント名と同じである必要があります。


    Please enter the name of the database schema [arco_write] >> 
    
    Searching for the jdbc driver oracle.jdbc.driver.OracleDriver 
    
    OK, jdbc driver found
    
    Should the connection to the database be tested? (y/n) [y] >> y
    
    Test db connection to 'jdbc:oracle:thin:@my-system:1521:arco' ... OK

    注 –

    JDBC ドライバは、$SGE_ROOT/reporting/WEB-INF/lib ディレクトリにも配置してください。


  7. 照会 (クエリー) と結果の格納を許可されたユーザーのログイン名を入力します。


    Configure users with write access
    
    Users: sge-admin
    Enter a login name of a user (Press enter to finish) >> user2
    Users: sge-admin user2
    Enter a login name of a user (Press enter to finish) >> 
    ---------------------------------

    注 –

    インストール後に、config.xml ファイルを編集して、承認ユーザーを追加または削除できます。詳細は、この章の最後を参照してください。


  8. 情報を確認します。


    All parameters are now collected
    --------------------------------
           SPOOL_DIR=/var/spool/arco
              DB_URL=jdbc:oracle:thin://my-system:1521/arco
             DB_USER=arco_read
    ARCO_WRITE_USERS=user1 user2
    
    Are this settings correct? (y/n) [y] >> y
    
    Shutting down Sun(TM) Web Console Version 2.2.1...
  9. 以前のバージョンの ARCo がインストールされている場合、そのバージョンを削除するかどうかを確認するメッセージが表示されます。


    GE reporting module already registered at Java Web Console
    ----------------------------------------------------------
    
    The GE reporting modules can only be installed
    if no previous version is registered.
    
    Should the GE reporting module com.sun.grid.arco_6.0-Maintrunc be unregistered? (y/n) [n] >> y
  10. 事前定義されたクエリーをインストールします。

    クエリーディレクトリがない場合は作成されます。サンプルクエリーが sge-root/reporting/database/example_queries/queries にインストールされます。既存のクエリーが置き換えられることはありません。


    Directory /var/spool/arco does not exist, create it? (y/n) [y] >> y
    
    Create directory /var/spool/arco
    Create directory /var/spool/arco/queries
    Copy examples queries into /var/spool/arco/queries
    Copy query Accounting_per_Department.xml ... OK
    Copy query Accounting_per_Project.xml ... OK
    Copy query Accounting_per_User.xml ... OK
    Copy query Average_Job_Turnaround_Time.xml ... OK
    Copy query Average_Job_Wait_Time.xml ... OK
    Copy query DBWriter_Performance.xml ... OK
    Copy query Host_Load.xml ... OK
    Copy query Job_Log.xml ... OK
    Copy query Number_of_Jobs_completed.xml ... OK
    Copy query Queue_Consumables.xml ... OK
    Copy query Statistic_History.xml ... OK
    Copy query Statistics.xml ... OK
    Create directory /var/spool/arco/results
  11. レポートモジュールが設定されていることを確認します。


    ARCo reporting module setup
    ---------------------------
    Copying ARCo reporting file into /opt/n1ge6/default/arco/reporting
    
    Setting up ARCo reporting configuration file. After registration of
    the ARCo reporting module at the Java Web Console you can find
    this file at
    
          /var/opt/webconsole/webapps/reporting/config.xml
    
    
    Hit <RETURN> to continue >>
  12. レポートモジュールが Web コンソールに登録され、コンソールが起動していることを確認します。


    Registering the GE reporting module in the Java Web Console
    -----------------------------------------------------------
    
        Registering com.sun.grid.arco_6.0-Maintrunc.
    
    
    Hit <RETURN> to continue >>
    
    Java Web Console startup
    ------------------------
    
    Starting Java Web Console ... OK
    
    Hit <RETURN> to continue >>
    
    GE ARCo reporting successfully installed
  13. エラーメッセージや警告メッセージがないか、ログファイルをチェックします。


    # more /var/log/webconsole/console_debug_log
    

    アカウンティングおよびレポートログは、/var/log/webconsole/console_debug_log ファイルに書き込まれます。デフォルトのログレベルは INFO です。ログレベルは、コマンド行から変更可能です。


    # smreg add -p -e arco_logging_level=FINE
    

    新しいログは、コンソールの次回起動時から有効になります。ログレベルの種類は、WARNINGINFOFINEFINER、および FINEST です。

  14. ブラウザに次の URL を入力して、Sun Java Web コンソールに接続します。hostname には、マスターホストの名前を指定します。


    https://hostname:6789
  15. UNIX アカウントでログインします。

  16. N1 Grid Engine 6 アカウンティングおよびレポートコンソールを選択します。

ProcedureARCo の承認ユーザーを追加する方法

ARCo レポートモジュールのインストール中に、ARCo システムに書き込み権を持つユーザーのリストを入力するように求められます。そのユーザーだけが ARCo に対する変更の保存を許可されます。

  1. ユーザーを適切なファイルに追加します。

    使用する Web コンソールのバージョンによって、承認ユーザーのリストは /var/opt/webconsole/webapps/reporting/config.xml または /usr/share/webconsole/webapps/reporting/config.xml に格納されます。

  2. このファイルの編集後は Sun Java Web コンソールを再起動します。


    # smcwebserver restart