SAP社からリモート接続するために利用するSAPRouterですが、意外とオプションに悩みます。
一応私の最適解はこちら
arg 0: /opt/saprouter/saprouter #実行ファイルのpath
arg 1: -r #起動オプション
arg 2: -R #SAPRoutetabの指定、pathはarg3
arg 3: /opt/saprouter/saprouttab
arg 4: -K #SNC接続の場合のみ。arg5とセット
arg 5: p:CN=SNC<hostname>, OU=xxxxxxxxxx, OU=SAProuter, O=SAP, C=DE
arg 6: -T #トレースログの指定、pathはarg7
arg 7: dev_saprouter.log
arg 8: -G #SAPRouterのログファイル指定、pathはarg9
arg 9: /opt/saprouter/saprouter.log
arg 10: -E #ログ、トレースログを上書きしない
arg 11: -J #SAPRouterログファイルを分割するサイズ
arg 12: 1024000 #1MB、手ごろサイズが良いと思う
再起動するとSAPRouterログやトレースログは消えてしまうので、防ぐためにEオプションを使う。
また、SAPRouterログは通信記録がどんどん記録されるので、Jオプションで分割サイズをしていしてあげる。上記では、1MBにしている。
分割したファイルは、下記のようにいつからいつまでのログかファイル名で判別できる。
saprouter.log_c_20230623_113711-20230623_114837
saprouter.log_c_20230623_114837-20230623_114839
saprouter.log_c_20230623_114839-20230623_114839