Stats Analysis - generating the Stats in SMPS logs


The Policy Server smps.log by default only generates one Statistics line when it starts up.

More can be generated by running the following command at the DOS or cmd prompt :
   
               smpolicysrv -stats 

However to make use of then in monitoring we need them generated at regular intervals, either by running them in a script that does a standard wait, or by setting them up as a scheduled/cron job.

The steps below explain how to setup those two options for both Unix and Windows.

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