Questings for long tearm using of JTSMon
I have sucessfully started to use JTSMon, but now I have two little questions
- Is it possible to continue monitoring when a server restart was necessary without loosing the monitoree data? Bause if I restart the monitor task he want to dfelete the directory.
- I want to monitor the long term performance for the Jazz Servers (years). Is it possible to combine the monitored data to a "big" report? Because I want to compare the performance now to the performance we have in some month. And in the deployment wiki there is the recomendation only to run the monitor process for one month. So how can I get an overview for one year or even longer periods?
Thanks and regards,
Martin
One answer
here is my windows script..
I can post the linux one too if anyone cares
@echo off
setlocal enableextensions enabledelayedexpansion
set tempdir=run0
set datadir=JTSMonRuntime
set savedir=!savedir!
rem capture start of run time
set DATE1=!date:~4,2!-!date:~7,2!-!date:~10,4!-!time:~0,2!.!time:~3,2!.!time:~6,2!
rem if not requested to bypass monitoring
if "%2." == "." (
rem don't erase existing data, but move out of the way to prevent overwrite prompt
if exist !datadir! (
move !datadir! "!datadir! problem !DATE1!"
)
rem rd /s/q !datadir! >nul 2>&1
rem monitor the system
echo monitoring started at !DATE1! >>runlog.txt
java -jar JTSMon.jar monitor PATH_OUTPUT_DIR=.\%datadir% RUN_DESCRIPTION="Jazz Monitoring Service started at %DATE%" >logfile 2>&1
set monrc=!errorlevel!
rem capture return code above
set DATE2=!date:~4,2!-!date:~7,2!-!date:~10,4!-!time:~0,2!.!time:~3,2!.!time:~6,2!
echo monitoring ended rc !monrc! at !DATE2! >>runlog.txt
rem echo 'return code is' !monrc!
rem if no problems with capture
if "!monrc!" == "0" (
rem save the captured monitor data
move !datadir! !tempdir! >nul
) else (
rem save the captured monitor data off to the side
move !datadir! "!tempdir!-error-!DATE1! to !DATE2!"
)
) else (
set monrc=0
)
rem if monitoring ended successfully or was bypassed by request
if "!monrc!" == "0" (
set ndate=!date:~4,2!-!date:~7,2!-!date:~10,4!-!time:~0,2!.!time:~3,2!.!time:~6,2!
rem if we should start monitoring again
if "%2." == "." (
rem if requested to surface the bash window use anything as parm 1
if "%1." == "." (
start /i "Jazz Monitoring Service started !ndate!" %0 %1
) else (
start /i /min "Jazz Monitoring Service started !ndate!" %0 %1
)
)
rem analyze in parallel
rem if the data dir didn't get created
if not exist !tempdir! (
move !datadir! !tempdir! >nul 2>&1
)
rem if there is data to analyze
if exist !tempdir! (
rem do the analyze step in parallel
java -jar JTSMon.jar analyze PATH_OUTPUT_DIR=.\!datadir!
if not exist !savedir! (
mkdir !savedir!
mkdir !savedir!\jts
mkdir !savedir!\ccm
mkdir !savedir!\aggregate
)
rem save the analyzed data
move !tempdir!\*.ccm ".\!savedir!\ccm\!DATE1! to !ndate!" >nul 2>&1
move !tempdir!\*.jts ".\!savedir!\jts\!DATE1! to !ndate!" >nul 2>&1
move !tempdir! ".\!savedir!\aggregate\!DATE1! to !ndate!" >nul 2>&1
exit
) else echo No directory found for !tempdir!
) else (
rem we should send an alert to someone here
echo some problem occurred
)
Comments
sam detweiler
Mar 18 '14, 6:44 a.m.I wrote a wrapper script that will save the data folder before starting another monitor session and then I can figure out what to do with it. the script restarts itself every day (jtsmon elapsed time period)
for 2. in my prior job I wrote a set of excel macros that combined daily results into a common sheet. I only selected a couple apis (configurable) to be combined (the top active apis) I had gotten up to 9 months of data (from 4 servers at the end) before the job was unexpectedly terminated.
1 vote