The \dir{bin/} directory of \Kieker's binary release contains some \file{.sh}  and %
\file{.bat} scripts to invoke tools included in \file{\mainJar{}}. %
The following sections give a short description of their functionality and %
list their usage outputs as printed to the standard output stream when %
called without command-line parameters. %
In addition to the standard output stream, the file \file{kieker.log} %
is used for logging output during execution.

% generated by the script gen-bin-usage-tex.sh with manual adjustments

\

\WARNBOX{%
The Windows \file{.bat} wrapper scripts must be executed from within %
the \dir{bin/} directory.
}

\section{Script \file{convertLoggingTimestamp.sh|bat}}

The script converts \KiekerMonitoringPart{} logging timestamps, %
representing the number of nanoseconds since 1~Jan 1970 00:00 UTC, to a %
human-readable textual representation in the UTC and local timezones. %

\

\noindent Main-class: {\small \class{kieker.tools.loggingTimestampConverter.LoggingTimestampConverterTool}}

\paragraph*{Usage}\

\setTextListing
\lstinputlisting[caption=]{Appendix-usage-convertLoggingTimestamp.sh.inc}

\paragraph*{Example}\

The following listing shows the command to convert two logging timestamps as %
well as the resulting output.

\enlargethispage{0.7cm}

\setTextListing
\begin{lstlisting}[caption=Execution under UNIX-like systems]
$\lstshellprompt{}$ $\textbf{bin/convertLoggingTimestamp.sh}$ $\textbf{-\,-timestamps}$ 1283156545581511026 1283156546127117246 
1283156545581511026: Mo, 30 Aug 2010 08:22:25 +0000 (UTC) (Mo, 30 Aug 2010 10:22:25 +0200 (local time))
1283156546127117246: Mo, 30 Aug 2010 08:22:26 +0000 (UTC) (Mo, 30 Aug 2010 10:22:26 +0200 (local time))
\end{lstlisting}

\begin{lstlisting}[caption=Execution under Windows]
$\lstshellprompt{}$ $\textbf{convertLoggingTimestamp.bat}$ $\textbf{-\,-timestamps}$ 1283156545581511026 1283156546127117246 
1283156545581511026: Mo, 30 Aug 2010 08:22:25 +0000 (UTC) (Mo, 30 Aug 2010 10:22:25 +0200 (local time))
1283156546127117246: Mo, 30 Aug 2010 08:22:26 +0000 (UTC) (Mo, 30 Aug 2010 10:22:26 +0200 (local time))
\end{lstlisting}

% \pagebreak

\section{Script \file{logReplay.sh|bat}}

Replays filesystem monitoring logs created by \KiekerMonitoringPart{}. %
Example applications are:
\begin{compactitem}
\item Merging multiple directories containing monitoring data into a single %
output directory. 
\item Importing a filesystem monitoring log to another monitoring log, e.g., %
a database. Therefore, an appropriate \KiekerMonitoringPart{} configuration %
file must be passed to the script (see Section~\ref{sec:monitoring:configuration}).
\item Replaying a recorded filesystem monitoring log in real-time (or faster/slower) in order to simulate %
incoming monitoring data from a running system, e.g., via JMS~(see also Appendix~\ref{appendix:usingJMS}). 
\end{compactitem}

\

\noindent Main-class: {\small \class{kieker.tools.logReplayer.FilesystemLogReplayerStarter}}

\paragraph*{Usage}\

\setTextListing
\lstinputlisting[caption=]{Appendix-usage-logReplay.sh.inc}

\paragraph*{Example}\

\noindent The following command replays the monitoring testdata included in %
the binary release to another directory:

% \pagebreak

\setTextListing
\begin{lstlisting}[caption=Execution under UNIX-like systems]
$\lstshellprompt{}$ $\textbf{bin/logReplay.sh}$
  $\textbf{-\,-inputdirs}$ $\distributedTestdataDirDistro$ 
  $\textbf{-\,-keep-logging-timestamps}$ $true$ 
  $\textbf{-\,-realtime}$ $false$
\end{lstlisting}
\begin{lstlisting}[caption=Execution under Windows]
$\lstshellprompt{}$ $\textbf{logReplay.bat}$
  $\textbf{-\,-inputdirs}$ $\distributedTestdataDirDistroWin$ 
  $\textbf{-\,-keep-logging-timestamps}$ $true$ 
  $\textbf{-\,-realtime}$ $false$
\end{lstlisting}


\section{Script \file{kax-run.sh|bat}}\label{appendix:wrapperScripts:kaxRun}

Executes a \KiekerAnalysisPart{} pipe-and-filter configuration file (\file{.kax} file), %
described in Section~\ref{sec:analysis:controller}. %

\noindent Main-class: {\small \class{kieker.tools.KaxRun}}

\paragraph*{Usage}\

\setTextListing
\lstinputlisting[caption=]{Appendix-usage-kax-run.sh.inc}

\section{Script \file{kax-viz.sh|bat}}\label{appendix:wrapperScripts:kaxViz}

Visualizes a \KiekerAnalysisPart{} pipe-and-filter configuration file (\file{.kax} file), %
described in Section~\ref{sec:analysis:controller}. %

\noindent Main-class: {\small \class{kieker.tools.KaxViz}}

\paragraph*{Usage}\

\setTextListing
\lstinputlisting[caption=]{Appendix-usage-kax-viz.sh.inc}

\section{Script \file{trace-analysis.sh|bat}}\label{appendix:wrapperScripts:traceAnalysis}

Calls \KiekerTraceAnalysis{} to analyze and visualize monitored trace data, %
as described in Chapter~\ref{chap:aspectJ}.

\

\noindent Main-class: {\small \class{kieker.tools.traceAnalysis.TraceAnalysisTool}}

% \pagebreak

\paragraph*{Usage}\

\enlargethispage{1cm}

\setTextListing
\lstinputlisting[caption=]{Appendix-usage-trace-analysis.sh.inc}

\paragraph*{Example}\

\noindent The following commands generate a deployment-level operation dependency 
graph and convert it to pdf format:

\enlargethispage{1cm}

\setTextListing
\begin{lstlisting}[caption=Execution under UNIX-like systems]
$\lstshellprompt{}$ $\textbf{bin/trace-analysis.sh}$
  $\textbf{-\,-inputdirs}$ $\distributedTestdataDirDistro$ 
  $\textbf{-\,-outputdir}$ . 
  $\textbf{-\,-plot-Deployment-Operation-Dependency-Graph}$
$\lstshellprompt{}$ $\textbf{dot}$ $\textbf{-T}$ pdf  deploymentOperationDependencyGraph.dot > deploymentOperationDependencyGraph.pdf
\end{lstlisting}

\begin{lstlisting}[caption=Execution under Windows]
$\lstshellprompt{}$ $\textbf{trace-analysis.bat}$
  $\textbf{-\,-inputdirs}$ $\distributedTestdataDirDistroWin$ 
  $\textbf{-\,-outputdir}$ . 
  $\textbf{-\,-plot-Deployment-Operation-Dependency-Graph}$
$\lstshellprompt{}$ $\textbf{dot}$ $\textbf{-T}$ pdf  deploymentOperationDependencyGraph.dot > deploymentOperationDependencyGraph.pdf
\end{lstlisting}

\noindent Additional examples can be found in Chapter~\ref{chap:aspectJ}.

\section{Script \file{dotPic-fileConverter.sh|bat}}\label{appendix:wrapperScripts:dotPicFileConverter}

Converts each \file{.dot} and \file{.pic} file, e.g., diagrams generated by %
\KiekerTraceAnalysis{} (Section~\ref{chap:aspectJ}), located in a directory %
into desired graphic output formats. %
This scripts simply calls the \textit{Graphviz} and \textit{PlotUtils} tools \file{dot} and \file{pic2plot}.

\paragraph*{Usage}\

\setTextListing
\lstinputlisting[caption=,firstline=3,lastline=3]{Appendix-usage-dotPic-fileConverter.sh.inc}

\paragraph*{Example}\

\noindent The following command converts each \file{.dot} and \file{.pic} file located in the %
directory \dir{out/} to files in \file{.pdf} and \file{.png} format:

\setTextListing
\begin{lstlisting}[caption=Execution under UNIX-like systems]
$\lstshellprompt{}$ $\textbf{bin/dotPic-fileConverter.sh}$ out/ pdf png
\end{lstlisting}
\begin{lstlisting}[caption=Execution under Windows]
$\lstshellprompt{}$ $\textbf{dotPic-fileConverter.bat}$ out\ pdf png
\end{lstlisting}