Siteminder Policy Server Stats Report

A tool to graph stats changes recorded in the smps logs. 

Siteminder Policy Server Stats Report
Introduction
  1. Overview
  2. Procedure
  3. Sample Reports
Installation
  1. Install Program
  2. Generating Stats in SMPS logs
    1. Option 1 - Basic Scripts 
    2. Option 2 - Scheduled Task
Running Reports
  1. Run the Policy Server Stats Report
  2. Run the Multi Policy Server Stats Report
  3. Changing Report Options




Introduction



Overview

The Siteminder policy server log contains some statistics output.  A simple script can be setup so the stats are generated at regular intervals.  The java program will go though the smps.log files, and generate a PDF report graphing changes in the various stats values. 

Some examples :

Num Messages handled by policy server over time


Graphs of the data changes, over a hour, or a week can often give a good insight into the health and working of a production policy server, and also identify times of peak load and stresses.

The report can also be an easy way to give the customer an understanding of their load and throughput requirements, peak times, and identify when problems have occurred.

Procedure

The process is fairly simple:
  1. Run the script to generate the stats into the smps.log file at a regular basis
    (it can be run via script or scheduled task)

  2. Run the java program over the smps.log files
    (it will extract the stats and also generate the PDF report)


Sample Reports


Here are some samples of the reports generated.


Installation


Install Program


Download and unzip java program from here:  SMPolicyStatsReport_dist.tar.gz

Generating Stats in SMPS logs

Option 1 - Basic Scripts 

These will generate stats every 10min from a cmd script in a loop (good for analysis of a problem that is occuring at the time).

Unix
Basic script to loop ever 10sec.

scripts/unix/appendstats.sh
Windows
DOS script using ping to do a delay, becasue DOS doesnt know how to sleep.

dos_appendstats.cmd.txt

Option 2 - Scheduled Task

Will generate stats every 10min from cron/scheduled task (good for long term monitoring - in fact most clients I work with have this installed permanantly) .

Unix
Edit your crontab setting for the user.
crontab -e
and setup something like the following (you may need a script, that also calls nete_ps_env.sh setup file or similar):
# every 10 min 
0,10,20,30,40,50 *  * * * (cd /opt/siteminder/bin; ./smpolicysrv -stats)
Windows
RTF file (with screenshots) walking you though setting up the Scheduled Job.

SMStatsAnalysis-WindowsHowto.rtf


Running Reports

Run the Policy Server Stats Report

  1. Put  relevant smps*.log files in directory.

  2. Run the extract program.
    $cd /tmp/PS1
    $/opt/SMPolicyStatsReport_dist/run.sh smps_*.log smps.log
    alternatively (for DOS):
    $java -jar /opt/SMPolicyStatsReport_dist/SMPolicyStatsAnalysis.jar extract smps_*.log smps.log

  3. View the report.
The report and extract files will be in the SMStatsReport subdirectory

SubDirectory

PDF report
Various csv files for use.
SMStatsReport
Policy Server Stats Report.pdf
smps_srcline_errorcount.csv
smps_stats_connections.csv
smps_stats_other.csv
smps_stats_threads.csv

To view the report :

$cd SMStatsReport
$acroread "Policy Server Stats Report.pdf"


Run the Multi Policy Server Stats Report

  1. Run the above Policy Server Stats Report for each policy server, keep them all in seperate
           directories. 

    For this example we will assume three previous reports, and in directories :
    /tmp/stats/PS1
    /tmp/stats/PS2
    /tmp/stats/PS3

    Running the above report will product a SMStatsReport subdirectory in each of PS1 PS2 and PS3 directories.

  2. Run the combined report
    $cd /tmp/stats
    $/opt/SMPolicyStatsReport_dist/runMulitReport.sh PS1 PS2 PS3
    alternatively (for DOS):
    $java -jar /opt/SMPolicyStatsReport_dist/SMPolicyStatsAnalysis.jar multireport PS1 PS2 PS3
  3. View the combined report

    The report will be prodcued in the directory you run the report.  For the example above the report will be in the /tmp/stats directory
    $acroread "Combined Policy Server Stats Report.pdf"


Changing Report Options

   You can adjust some of the properties that are printed.

        Copy and edit the SMPolicyStatsReport.properties in the dist directory and edit as needed.




More Information :


This program is still under development, when time permits, and suggestions and comments are welcome.

You can contact the author Mark O'Donohue at (odoma04@ca.com)

Mark.  Dec-2010