Script smpolicysrv -stats to run on Linux Policy Server smps.log

book

Article ID: 37691

calendar_today

Updated On:

Products

CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign On SOA Security Manager (SiteMinder) CA Single Sign-On SITEMINDER

Issue/Introduction

 

When running into problems with Policy Server TCP connections, and need to request more statistics from the Policy Server process that would be dumped into the logs to continue analysis.

The "smpolicysrv -stats" command will dump the Policy Server statistics into the smps.log file on the Policy Server. This helps in seeing essential Policy Server functions such as Connection Pool usage, Request Queue usage, and Thread usage. By regularly dumping the statistics into the smps.log, resource usage can be reviewed, and identifying potential issues with the saturation of the connection or thread pools and significant growth in queues can be analyzed. This information is helpful for both monitoring and troubleshooting.

A cron job is beneficial to run when the logs do not display enough detail related to performance, etc.

When running every 5 minutes, this command should have no adverse impact on system performance.

 

Resolution

 

1) Configure a shell script [smpolcysrv-stats.sh] to execute the 'stats' command

   SYNTAX: 

   #!/bin/bash 

   . <Install_Dir>/CA/siteminder/ca_ps_env.ksh 

   smpolicysrv -stats 

   EXAMPLE: 

   #!/bin/bash 

   . /opt/CA/siteminder/ca_ps_env.ksh 

   /opt/CA/siteminder/bin/smpolicysrv -stats 

   (where /opt/CA/siteminder/bin/ is the bin directory where the smpolicysrv binary file is located, and '-stats' is the command that will allow the statistics to be taken on the Policy Server process that is running and dumped into the smps.log)

2) Configure a cron job to execute the "smpolicysrv-stats.sh" script every 5 minutes

   # crontab -e
   
   */5 * * * * /opt/CA/siteminder/smpolicysrv-stats.sh 

   Run the cron as the user that runs policy server process - example runs every 3 minutes

   # crontab -e

   0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /opt/CA/siteminder/smpolicysrv-stats.sh

   Note that the asterisks in the above example stand for minutes, hours, days, months, and "day of week" respectively.