WLSTによるMbean情報の取得を実施したいのですが、以下のpyファイルで実行すると想定外のエラーが出力されます。原因調査中となります。
●weblogic_kanshi.py
connect('wls_admin','wls_admin','t3://localhost:9003') import time import traceback serverRuntime() print "Day,Time,State,CurrCapacity,ActiveConnectionsCurrentCount,WaitingForConnectionCurrentCount" while(true): try: oJDBCDataSourceRuntime = getMBean('JDBCServiceRuntime/AdminServer/JDBCDataSourceRuntimeMBeans/JDBC Data Source') oState = oJDBCDataSourceRuntime.getState() oCurrCapacity = oJDBCDataSourceRuntime.getCurrCapacity() oActiveConnectionsCurrentCount = oJDBCDataSourceRuntime.getActiveConnectionsCurrentCount() oWaitingForConnectionCurrentCount = oJDBCDataSourceRuntime.getWaitingForConnectionCurrentCount() print time.strftime('%Y-%m-%d,%H:%M:%S') + "," + str(oState) + "," + str(oCurrCapacity) + "," + str(oActiveConnectionsCurrentCount) + "," + str(oWaitingForConnectionCurrentCount) time.sleep(1) except: print "<<<error>>>" traceback.print_exc() disconnect() break
●実行コマンド
cd /opt/oracle/Middleware/Oracle_Home/user_projects/domains/srdcsc/bin source setDomainEnv.sh java weblogic.WLST weblogic_kanshi.py
●エラー
srdcs@SSVR0224:/opt/oracle/Middleware/Oracle_Home/user_projects/domains/srdcsc$ java weblogic.WLST /export/home/oracle/weblogic_kanshi.py Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands Problem invoking WLST - Traceback (innermost last): (no code object) at line 0 File "/export/home/oracle/weblogic_kanshi.py", line 7 try: ^ SyntaxError: invalid syntax
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。