Siebel Administration >  SARM or Siebel Application Response Management

When a user does something in Siebel e.g. click on a link that will
take the user to a page, Siebel takes some time to bring the page.
This time taken is called Siebel response time. It is a sum total of time taken by
Siebel Web Server, SWSE, Siebel Server and Siebel Database.
SARM is a tool in Siebel that allows us to analyze and get logs of response time in Siebel.
SARM is available in Siebel enterprise product release 7.5.3 and higher.
This is a very useful tool for performance analysis.

These objects can be analyzed
Server Request Performance
Siebel Web Engine (SWE) View Performance
Script Performance
Workflow Performance
Database Query Performance
Solaris Operating system review

Both graphical and text based analysis can be done. SARM also allows CPU and memory snapshots
and session tracing. To use SARM, there are a few steps that need to be done
a. Enabling SARM
b. Storing logfiles
c. Analyzing the files to generate reports

Lets go through them one by one.

Enabling SARM on Siebel Servers

At the very basic level we need to log into server manager and enable 2 parameters -
SARMLevel and SARMLogDirectory. The changes need to be done on the object manager level.


change param SARMLevel=2 for comp eFinn_enu
change param SARMLogDirectory=/app/siebel/files/SARM

SARM is enabled if SARMLevel is greater than 0. A value of 1 shows less logs and value 3
is not used for us, Oracle uses it for some great secret work :)

SARMLogDirectory can be any directory where Siebel has access. In UNIX it will be all folders
user siebel has rights to write.

If you type this in servermanager prompt, you will get all other SARM parameters

list parameter %SARM% for server SERVERNAME COMPONENTNAME show PA_VALUE, PA_ALIAS

Some of the parameters are

SARMBufferSize - the amount of physical memory in bytes that is kept for each process.
The average value should be in several megabytes

SARMPeriod - How much time in minutes SARM generates a log. Keep integer values.

SARMUsers - login ids of users separated by commas, case sensitive all upper case.
If this is not mentioned , all users are tracked.

SARMThreshold - period in milliseconds. This is used to define query sizes.
e.g. we might want a list of screens that took more than 5 seconds to respond.

SARMMaxFileSize will determine the maximum size of the SARM file but SARM
may create a new file when 80% of the file size is reached. The value is in bytes.

SARMMaxMemory-Performance data is temporarily stored in memory up to the value
of SARMMaxMemory and periodically flushed to disk. Value is in bytes and should be an integer.


Enabling SARM in Web Server

SARM can be enabled on many other components e.g. Database, Network etc.
Enabling it in the Web Serverin UNIX is explained here.

Go to the root of the webserver and find the start and stop scripts.
Stop the Webserver and edit the start script.

Add these lines in the script

setenv SIEBEL_SARMEnabled true
setenv SIEBEL_SARMMaxFileSize 400000
setenv SIEBEL_SARMLEVEL=2
setenv SIEBEL_SARMBUFERFIZE=4000000
setenv SIEBEL_SARMPERIOD=5
setenv SIEBEL_SARMMAXFILES=10
setenv SIEBEL_SARMMaxMemory = 20000

export SIEBEL_SARMEnabled true
export SIEBEL_SARMMaxFileSize 400000
export SIEBEL_SARMLEVEL=2
export SIEBEL_SARMBUFERFIZE=4000000
export SIEBEL_SARMPERIOD=5
export SIEBEL_SARMMAXFILES=10
export SIEBEL_SARMMaxMemory = 20000

save and start the Webserver using the start script.

Enabling it in Webserver in Microsoft Windows

From the Desktop, right click on My Computer icon and select Properties.
2. Go to the Advanced tab.
3. Select Environment Variables. Add the system environment variables.
SIEBEL_SARMEnabled = true
SIEBEL_SARMMaxMemory = 20000
SIEBEL_SARMMaxFileSize = 400000

Add all the values that you want (e.g. SIEBEL_SARMMAXFILES, SIEBEL_SARMMaxMemory)
The Webserver needs to be restarted.

Similarly you can enable them in other components
e.g.
change param SARMMaxFiles=10 for comp WfProcBatchMgr server SERVERNAME
change param SARMMaxFiles=10 for comp WfProcMgr server SERVERNAME
for the Workflowprocess Batch Manager and Workflow Process Manager.


The SARM files have this naming convention:
S01_P<pid>_N<filenumber>.sarm
S01 - constant number
<pid> - Siebel server process id
<filenumber> - file number.
This starts at 0000 and it increments until it reaches 9999, at which point it becomes 0000 again.
The Most recent 4 files (per process) are retained. An example of this is S01_P49680_V0000.sarm.

SARM Analyzer Tool,reading and managing SARM files

.sarm files that are generated are in binary format. These files need to be converted to .csv format
and the SARM Analyzer tool allows us to do that.

In UNIX to convert a .sarm file to an xml file we need this command
sarmalyzer -f <sarmfilename.sarm> <choosefilename.xml>

In Windows use this command
SARMAnalyzer -f <sarmfilename.sarm> <choosefilename.xml>

Alternatively, you can also generate the output in CSV format.


User Session trace
SARM allows us to do user session trace if we use the -w command. Also we can use -csv
parameter to create another session trace file.

To create a User Session Trace, run the SARM Analyzer in two different modes:
Syntax:
On Windows: SARMAnalyzer -w <websrvr sarm file> -s <siebsrvr sarm file> -u <user name>
On Unix: sarmanalyzer -w <websrvr sarm file> -s <siebsrvr sarm file> -u <user name>
Output File Name: <user name>.xml
Example on Windows:
SARMAnalyzer -w S01_P239462_N0004.sarm -s S01_P239462_N0004.sarm -u sadmin.xml

Syntax:
On Windows: SARMAnalyzer.exe -csv -prop <websrvr sarm file> > <some_file_name.csv>
On Unix: sarmnalyzer.exe -csv -prop <websrvr sarm file> > <some_file_name.csv>
Output File Name: <some_file_name.csv>
Example on Windows:
SARMAnalyzer.exe -csv -prop S01_P239462_N0004.sarm > S01_P20862_N0002_SWSE.csv

Reading the CSV files generated from SARMAnalyzer tool

The headers generated by SARM files are

SarmID,"ThreadID","IsRoot","Type(level)","StartTime","RootID",
"ParentSarmID","ParentTimeID","ParentProcID","AreaCodeSymbol","AreaDesc","SubAreaCodeSymbol"
,"SubAreaDesc","Count","PrunedCount","PrunedDuration(MS)","Duration(MiliSecs)",
"CPUTime(MiliSecs)","%CPU","PooledMemoryUsage(bytes)","PooledMemoryCalls(bytes)",
"SystemMemoryUsage(bytes)","SystemMemoryCalls(bytes)","AppInt1","AppInt2","AppStr1","AppStr2"

 

The csv file can be quite unreadable, Siebel has several queries that can be used to generate readable data.

SARM Queries
In the siebel server bin directory try these queries

sarmquery -i . -aggregate area
this command will show the top areas


sarmquery -i . -aggregate subarea
this command will show the top sub areas

sarmquery -i . -aggregate subarea -select user=sadmin -select selftime=2000
This query will show the responses over 2 seconds for user sadmin

sarmquery -i . -aggregate component
This query will show the response of the components and the time they take.

sarmquery -i . -aggregate component -select selftime=5000 -output avginclresp=tmp/result.txt

In the /tmp/result.txt file you will get a list of all components taking time of over 5 seconds
on a self call (not indirect calls).

sarmquery -i . -aggregate user -select resptime=5000 -output avginclresp=tmp/result.txt
This query will show which users had to wait for 5 seconds or more to get a response.

The output will be in text files or in the command prompt as tabbed columns and numbers.