tar 方式または pkgadd 方式を使用して、アカウンティングおよびレポートソフトウェアを展開します。
レポート機能が有効になるように、グローバル構成を変更します。
レポート機能を有効にする方法の詳細は、『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 <......> |
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 >> |
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 >> |
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 |
レポートデータベースの接続パラメータを指定します。
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] >> |
データベースユーザーのユーザー名とパスワードを入力します。
Please enter the name of the database user [arco_write] >> Please enter the password of the database user >> Please retype the password >> |
データベーススキーマの名前を入力します。
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 >> |
データベースが正しく設定されていることを確認します。
Should the connection to the database be tested? (y/n) [y] >> |
データベースモデルを初期化またはアップグレードします。
次の処理中に、データベーステーブルが作成または更新されます。ユーザー 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 |
dbWriter プログラムが N1 Grid Engine ログファイルの新規データをチェックする頻度を指定します。
Please enter the interval between two dbwriter runs in seconds [60] >> |
dbwriter 用のスプールディレクトリを指定します。
dbwriter のログファイルがこのディレクトリに格納されます。dbwriter のプロセスの起動時に、このディレクトリにある dbwriter.pid ファイルに pid が書き込まれます。
Please enter the path of the dbwriter spool directory [$SGE_ROOT/$SGE_CELL/spool/dbwriter]>> |
派生値の計算規則が格納されているファイルの場所を入力します。
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] >> |
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] >> |
設定を確認します。
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 |
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 |
dbWriter プログラムを起動します。
# /etc/init.d/sgedbwriter start |