clwTxnTracer
clwTxnTracer <しきい値> <期間>
各値は以下のとおりです。
しきい値はトランザクション実行時間のしきい値で、秒単位で指定します。
期間はセッションの存続期間で、秒単位で指定します。
clwTxnTracer 1 600
1 秒より長く実行されたすべてのトランザクションに対して、600 秒間のトランザクション追跡セッションが実行されます。
トランザクション追跡データは、以下のように、現在の日付に対応するディレクトリ内の 1 つのファイルに書き込まれます。
<EM_Home>/traces¥<年>¥<月>¥<日>¥<エージェント> _<しきい値>secs_for<継続時間>secs.<開始時刻>.xml
例:
C:¥introscope¥traces¥2004¥11¥11¥AllAgents_1secs_for600secs.
14091705.xml
@ECHO OFFSETLOCAL TITLE Introscope -- Transaction Tracer Session REM **** REM Sets the current working directory with quotes around it REM This enables this file to execute correctly if it is REM invoked somewhere other than its location. REM **** FOR /f "tokens=1 delims=" %%a in ('cd') DO SET PWD=%%a REM **** REM Set the command directory to the command argument itself, REM namely the full path of this file or the relative path REM to where the file was invoked. SET CMD_DIR=%0 REM Now simply strip out the name of this file to get dir REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REM Use current filename SET CMD_DIR=%CMD_DIR:clwTxnTracer.cmd=% REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REM Strip the quotes REM add quotes if they're not there SET CMD_DIR="%CMD_DIR%" REM if not add quotes, then this statement chokes SET CMD_DIR=%CMD_DIR:"=% REM if the current dir wasn't determined, just set it to working dir IF NOT EXIST "%CMD_DIR%" SET CMD_DIR=. IF "%CMD_DIR%" == %0 SET CMD_DIR=. IF "%CMD_DIR%" == "%0" SET CMD_DIR=. REM **** REM Now set the home directory for Introscope, and others IF NOT EXIST "%CMD_DIR%¥setIscEnv.cmd" goto noSetEnvFile call "%CMD_DIR%¥setIscEnv.cmd" SET TT_THRESHOLD_IN_SECS=%1 SET TT_DURATION_IN_SECS=%2 IF "X%TT_THRESHOLD_IN_SECS%" == "X" SET TT_THRESHOLD_IN_SECS=10000 IF "X%TT_DURATION_IN_SECS%" == "X" SET TT_DURATION_IN_SECS=600 IF %TT_THRESHOLD_IN_SECS% LEQ 0 GOTO badArg IF %TT_DURATION_IN_SECS% LEQ 0 GOTO badArg SET TT_AGENTS=(.*) REM Java Settings (e.g. increase Max heap size ) SET JAVA_OPTS=-Xms64m -Xmx512m SET JAVA_OPTS=%JAVA_OPTS% %CLW_USER_OPT% %CLW_PASSWORD_OPT% %CLW_EM_HOST_OPT% %CLW_EM_PORT_OPT% SET COMMAND=trace transactions exceeding %TT_THRESHOLD_IN_SECS% seconds in agents matching ¥"%TT_AGENTS%¥" for %TT_DURATION_IN_SECS% seconds SET AGENT_STR=%TT_AGENTS% REM Remove the spaces, parentheses SET AGENT_STR=%AGENT_STR:(=% SET AGENT_STR=%AGENT_STR:)=% SET AGENT_STR=%AGENT_STR: =% if "X%TT_AGENTS%" == "X(.*)" SET AGENT_STR=AllAgents FOR /f "tokens=1-4 delims=:." %%a in ("%time%") DO SET SECS_STR=%%a%%b%%c%%d FOR /f "tokens=1-4 delims=/ " %%a in ("%date%") DO SET TRACES_DIR=%ISC_TRACES%¥%%d¥%%b¥%%c REM Create the traces dir, if not exist IF NOT EXIST "%TRACES_DIR%" MKDIR "%TRACES_DIR%" SET TT_FILE=%TRACES_DIR%¥%AGENT_STR%_%TT_THRESHOLD_IN_SECS%secs_for%TT_DURATION_IN_SECS%secs.%SECS_STR%.xml TITLE Introscope -- Transaction Tracer for %TT_DURATION_IN_SECS% secs with threshold %TT_THRESHOLD_IN_SECS% secs REM send stderr to null b/c there are meaningless disconnect excepts that might be *scary-looking* ECHO Saving session output to %TT_FILE% "%ISC_JAVA_HOME%¥bin¥java" %JAVA_OPTS% -jar "%CLW_JAR%" %COMMAND% > "%TT_FILE%" 2>NUL goto finish :badArg ECHO Arguments should be greater than zero. ECHO Syntax: $0 "threshold in secs" "duration in secs" goto finish :noSetEnvFile ECHO There is no environment setup file: setIscEnv.cmd ECHO Please re-run configureWily.cmd in installation directory! goto finish :finish ENDLOCAL
Copyright © 2013 CA.
All rights reserved.
|
|