wsadmin スクリプト・クライアントを開始するためのオプション: |
説明: |
例: |
スクリプト・コマンドを対話式に実行します。 |
wsadmin を、-f または -c 以外のオプションを指定するか、
オプションを指定しないで実行します。
wsadmin プロンプトを備えた対話式シェルが表示されます。
wsadmin プロンプトから、任意の Jacl または Jython コマンドを入力します。
AdminControl、AdminApp、AdminConfig、AdminTask、または Help の各 wsadmin オブジェクトを使用して、
コマンドを呼び出すこともできます。
対話式スクリプト・セッションを終了するには、
quit コマンドまたは exit コマンドを使用します。これらのコマンドは、引数を取りません。
|
Windows システムで Jython を使用: wsadmin.bat -lang jython
AIX または Linux などのオペレーティング・システム上で Jython を使用: wsadmin.sh -lang jython
デフォルトにより、セキュリティーは使用可能です:
wsadmin.sh -lang jython -user wsadmin -password wsadmin
Windows システムで Jacl を使用: wsadmin.bat
AIX または Linux などのオペレーティング・システム上で Jacl を使用: wsadmin.sh
セキュリティーが使用可能になっている場合:
wsadmin.sh -user wsadmin -password wsadmin
出力例:
Jython を使用した出力例は次のとおりです。 WASX7209I: Connected to process server1
on node myhost using SOAP connector;
The type of process is: UnManagedProcess
WASX7029I: For help, enter: "$Help help"
wsadmin>print AdminApp.list()
DefaultApplication¥nIBMUTC¥nivtApp¥nquery¥nsampleEAR
wsadmin>exit
Jacl example output: WASX7209I: Connected to process server1
on node myhost using SOAP connector;
The type of process is: UnManagedProcess
WASX7029I: For help, enter: "$Help help"
wsadmin>$AdminApp list
adminconsole
DefaultApplication
ivtAppwsadmin>exit
|
個別のコマンドとしてスクリプト・コマンドを実行します。 |
-c オプションを指定して wsadmin ツールを実行します。
Unix オペレーティング・システムでは、
wsadmin -c オプションを使用してドル記号 ($) を含むコマンドを起動すると、
コマンド行は変数置換を試みます。
この問題を回避するには、円記号 (¥) を使用してドル記号をエスケープします。
例えば、wsadmin -c "¥$AdminApp install ..." のようにします。
.
|
AIX または Linux などのオペレーティング・システム上で Jython を使用: wsadmin.sh -lang jython -c 'AdminApp.list()'
Windows システムで Jacl を使用: wsadmin -c "$AdminApp list"
AIX または Linux などのオペレーティング・システム上で Jacl を使用: wsadmin.sh -c "¥$AdminApp list"
または wsadmin.sh -c '$AdminApp list'
Windows システムで Jython を使用: wsadmin -lang jython -c "AdminApp.list()"
出力例:
WASX7209I: Connected to process "server1"
on node myhost using SOAP connector;
The type of process is: UnManagedProcess
adminconsole
DefaultApplication
ivtApp
|
スクリプトでスクリプト・コマンドを実行します。 |
-f オプションを指定して wsadmin ツールを実行し、
実行するコマンドをファイル内に配置します。
|
Windows システムで Jython を使用: wsadmin -lang jython -f al.py
AIX または Linux などのオペレーティング・システム上で Jython を使用: wsadmin.sh -lang jython -f al.py
ここで、
al.py ファイルには、以下のコマンドが含まれます。
apps = AdminApp.list()
print apps
出力例:
WASX7209I: Connected to process "server1"
on node myhost using SOAP connector;
The type of process is: UnManagedProcess
adminconsole
DefaultApplication
ivtApp
|
プロファイル・スクリプトのスクリプト・コマンドを実行します。 |
プロファイル・スクリプト とは、メイン・スクリプトの前、
または対話モードに入る前に実行するスクリプトです。
プロファイル・スクリプトを使用して、ユーザー用またはインストール・システム
用にカスタマイズされたスクリプト環境をセットアップすることができます。
デフォルトではこれらのファイルは ASCII です。profile.encoding オプションを使用して
EBCDIC でエンコードされたプロファイル・スクリプト・ファイルを実行する
には、ファイルのエンコード方式を EBCDIC に変更します。
プロファイル・スクリプトでスクリプト・コマンドを実行するには、-profile オプションを指定して
wsadmin ツールを実行し、実行対象のコマンドをプロファイル・スクリプトに組み込みます。
スクリプト環境をカスタマイズする場合は、1 つ
以上のプロファイル・スクリプトを実行するよう指定します。
プロファイルを作成する際には、ノード名に括弧を使用しないでください。
|
Windows システムで Jython を使用: wsadmin.bat -lang jython -profile alprof.py
AIX または Linux などのオペレーティング・システム上で Jython を使用: wsadmin.sh -lang jython -profile alprof.py
ここで、
alprof.py ファイルには、以下のコマンドが含まれます。
apps = AdminApp.list()
print "Applications currently installed:¥n " + apps
出力例:
WASX7209I: Connected to process "server1"
on node myhost using SOAP connector;
The type of process is: UnManagedProcess
Applications currently installed:
adminconsole
DefaultApplication
ivtApp WASX7029I: For help, enter: "Help.help()"
wsadmin>
Windows システムで Jacl を使用: wsadmin.bat -profile alprof.jacl
AIX または Linux などのオペレーティング・システム上で Jacl を使用: wsadmin.sh -profile alprof.jacl
ここで、
alprof.jacl ファイルには、以下のコマンドが含まれます。
set apps [$AdminApp list]
puts "Applications currently installed:¥n$apps"
出力例:
WASX7209I: Connected to process "server1"
on node myhost using SOAP connector;
The type of process is: UnManagedProcess
Applications currently installed:
adminconsole
DefaultApplication
ivtApp WASX7029I: For help, enter: "$Help help"
wsadmin>
|