Siebel Performance Tuning Guide > Analyzing Siebel ARM Data > Analyzing Siebel ARM Files using the Siebel ARM Query Tool >
Using Macros with the Siebel ARM Query Tool
The Siebel ARM Query Tool supports the use of macros. A macro allows you to save and reuse complex queries to a file which you can subsequently use as input for the Siebel ARM Query Tool.
To create a macro, you need to:
For example, the following query that retrieves data on the average login time for users can be input as one entry from the command line:
> sarmquery -input d:\sarmdata -select source=web -select subarea=swse_login -select tree=all -select depth=1 -aggregate user -output avginclresp=stdout.txt
However, in the .CFG file the above query is assigned the macro name [Login] and appears as follows:
For the Siebel ARM Query Tool to use a macro, you need to specify two parameters:
The following example requests that the Siebel ARM Query Tool execute the Login macro which is saved in the macro.cfg file.
> sarmquery -config file=macro.cfg -config macro=Login
The Siebel ARM Query Tool reads the input arguments for the macro as if you had specified the individual parts of the macro on the command line. This means that you can specify additional arguments that may not be in your macro. The following example executes the Login macro and in addition specifies a time slice:
> sarmquery -config file=macro.cfg -config macro=Login -select starttime="2004-06-10 10:00:00" -sel endtime="2004-06-11 09:59:59"
For a complete description of the macro language syntax and other options, execute the following command from the command line:
> sarmquery -macrosyntax