ベンチマークsql-5.0というツールをインストールして使用しようとしたところ、次のような問題が見つかりました。
[oracle@db01 run]$ ./runBenchmark.sh props.ora
09:43:33,081 [main] INFO jTPCC : Term-00,
09:43:33,083 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
09:43:33,083 [main] INFO jTPCC : Term-00, BenchmarkSQL v5.0
09:43:33,083 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
09:43:33,083 [main] INFO jTPCC : Term-00, (c) 2003, Raul Barbosa
09:43:33,084 [main] INFO jTPCC : Term-00, (c) 2004-2016, Denis Lussier
09:43:33,086 [main] INFO jTPCC : Term-00, (c) 2016, Jan Wieck
09:43:33,086 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
09:43:33,086 [main] INFO jTPCC : Term-00,
09:43:33,086 [main] INFO jTPCC : Term-00, db=oracle
09:43:33,086 [main] INFO jTPCC : Term-00, driver=oracle.jdbc.driver.OracleDriver
09:43:33,086 [main] INFO jTPCC : Term-00, conn=jdbc:oracle:thin:@localhost:1521:cc
09:43:33,086 [main] INFO jTPCC : Term-00, user=benchmarksql
09:43:33,086 [main] INFO jTPCC : Term-00,
09:43:33,086 [main] INFO jTPCC : Term-00, warehouses=1
09:43:33,086 [main] INFO jTPCC : Term-00, terminals=1
09:43:33,088 [main] INFO jTPCC : Term-00, runTxnsPerTerminal=10
09:43:33,088 [main] INFO jTPCC : Term-00, limitTxnsPerMin=300
09:43:33,088 [main] INFO jTPCC : Term-00, terminalWarehouseFixed=true
09:43:33,088 [main] INFO jTPCC : Term-00,
09:43:33,088 [main] INFO jTPCC : Term-00, newOrderWeight=45
09:43:33,088 [main] INFO jTPCC : Term-00, paymentWeight=43
09:43:33,088 [main] INFO jTPCC : Term-00, orderStatusWeight=4
09:43:33,088 [main] INFO jTPCC : Term-00, deliveryWeight=4
09:43:33,088 [main] INFO jTPCC : Term-00, stockLevelWeight=4
09:43:33,089 [main] INFO jTPCC : Term-00,
09:43:33,089 [main] INFO jTPCC : Term-00, resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
09:43:33,089 [main] INFO jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
09:43:33,089 [main] INFO jTPCC : Term-00,
09:43:33,235 [main] INFO jTPCC : Term-00, copied props.ora to my_result_2021-12-30_094333/run.properties
09:43:33,235 [main] INFO jTPCC : Term-00, created my_result_2021-12-30_094333/data/runInfo.csv for runID 8
09:43:33,235 [main] INFO jTPCC : Term-00, writing per transaction results to my_result_2021-12-30_094333/data/result.csv
09:43:33,236 [main] INFO jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
09:43:33,236 [main] INFO jTPCC : Term-00, osCollectorInterval=1
09:43:33,236 [main] INFO jTPCC : Term-00, osCollectorSSHAddr=null
09:43:33,236 [main] INFO jTPCC : Term-00, osCollectorDevices=net_eth0 blk_sda
09:43:33,243 [main] ERROR OSCollector : OSCollector Cannot run program "python": error=13, Permission denied
java.io.IOException: Cannot run program "python": error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at OSCollector.<init>(OSCollector.java:83)
at jTPCC.<init>(jTPCC.java:256)
at jTPCC.main(jTPCC.java:53)
Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 3 more
最初はyumを介してpython36とpython2をインストールするソリューションを見つけましたが、役に立ちませんでした。では、このようなエラーが発生した場合はどうすればよいですか?ご意見ありがとうございます。
完了するには、コマンドを使用するとsh -x runBenchmark.sh props.ora
次のエラーが発生します。
java -cp '.:../lib/oracle/*:/oracle/product/122/lib/*:../lib/*:../dist/*' -Dprop=props.ora -DrunID=19 jTPCC
全体のプロセスがここに表示されます。
[oracle@db01 run]$ sh -x runBenchmark.sh props.ora
+ '[' 1 -ne 1 ']'
+ SEQ_FILE=./.jTPCC_run_seq.dat
+ '[' '!' -f ./.jTPCC_run_seq.dat ']'
+++ cat ./.jTPCC_run_seq.dat
++ expr 18 + 1
+ SEQ=19
+ echo 19
+ source funcs.sh props.ora
++ PROPS=props.ora
++ '[' '!' -f props.ora ']'
++ case "$(getProp db)" in
+++ getProp db
+++ grep '^db=' props.ora
+++ sed -e 's/^db=//'
+ setCP
+ case "$(getProp db)" in
++ getProp db
++ grep '^db=' props.ora
++ sed -e 's/^db=//'
+ cp='../lib/oracle/*'
+ '[' '!' -z /oracle/product/122 -a -d /oracle/product/122/lib ']'
+ cp='../lib/oracle/*:/oracle/product/122/lib/*'
+ cp='../lib/oracle/*:/oracle/product/122/lib/*:../lib/*'
+ myCP='.:../lib/oracle/*:/oracle/product/122/lib/*:../lib/*:../dist/*'
+ export myCP
+ myOPTS='-Dprop=props.ora -DrunID=19'
+ java -cp '.:../lib/oracle/*:/oracle/product/122/lib/*:../lib/*:../dist/*' -Dprop=props.ora -DrunID=19 jTPCC
13:38:18,427 [main] INFO jTPCC : Term-00,
13:38:18,429 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
13:38:18,429 [main] INFO jTPCC : Term-00, BenchmarkSQL v5.0
13:38:18,429 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
13:38:18,430 [main] INFO jTPCC : Term-00, (c) 2003, Raul Barbosa
13:38:18,430 [main] INFO jTPCC : Term-00, (c) 2004-2016, Denis Lussier
13:38:18,432 [main] INFO jTPCC : Term-00, (c) 2016, Jan Wieck
13:38:18,432 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
13:38:18,432 [main] INFO jTPCC : Term-00,
13:38:18,432 [main] INFO jTPCC : Term-00, db=oracle
13:38:18,432 [main] INFO jTPCC : Term-00, driver=oracle.jdbc.driver.OracleDriver
13:38:18,432 [main] INFO jTPCC : Term-00, conn=jdbc:oracle:thin:@localhost:1521:cc
13:38:18,433 [main] INFO jTPCC : Term-00, user=benchmarksql
13:38:18,433 [main] INFO jTPCC : Term-00,
13:38:18,433 [main] INFO jTPCC : Term-00, warehouses=1
13:38:18,433 [main] INFO jTPCC : Term-00, terminals=1
13:38:18,435 [main] INFO jTPCC : Term-00, runTxnsPerTerminal=10
13:38:18,435 [main] INFO jTPCC : Term-00, limitTxnsPerMin=300
13:38:18,435 [main] INFO jTPCC : Term-00, terminalWarehouseFixed=true
13:38:18,435 [main] INFO jTPCC : Term-00,
13:38:18,435 [main] INFO jTPCC : Term-00, newOrderWeight=45
13:38:18,435 [main] INFO jTPCC : Term-00, paymentWeight=43
13:38:18,435 [main] INFO jTPCC : Term-00, orderStatusWeight=4
13:38:18,435 [main] INFO jTPCC : Term-00, deliveryWeight=4
13:38:18,435 [main] INFO jTPCC : Term-00, stockLevelWeight=4
13:38:18,435 [main] INFO jTPCC : Term-00,
13:38:18,436 [main] INFO jTPCC : Term-00, resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
13:38:18,436 [main] INFO jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
13:38:18,436 [main] INFO jTPCC : Term-00,
13:38:18,605 [main] INFO jTPCC : Term-00, copied props.ora to my_result_2021-12-30_133818/run.properties
13:38:18,606 [main] INFO jTPCC : Term-00, created my_result_2021-12-30_133818/data/runInfo.csv for runID 19
13:38:18,606 [main] INFO jTPCC : Term-00, writing per transaction results to my_result_2021-12-30_133818/data/result.csv
13:38:18,606 [main] INFO jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
13:38:18,607 [main] INFO jTPCC : Term-00, osCollectorInterval=1
13:38:18,607 [main] INFO jTPCC : Term-00, osCollectorSSHAddr=null
13:38:18,607 [main] INFO jTPCC : Term-00, osCollectorDevices=net_eth0 blk_sda
13:38:18,614 [main] ERROR OSCollector : OSCollector Cannot run program "python": error=13, Permission denied
java.io.IOException: Cannot run program "python": error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at OSCollector.<init>(OSCollector.java:83)
at jTPCC.<init>(jTPCC.java:256)
at jTPCC.main(jTPCC.java:53)
Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 3 more
ところで、権限拒否の問題を解決するためにchmodコマンドとsudoコマンドを試してみましたが、役に立ちませんでした。