Diagnosing errors with policies
Use this information to help you identify the source of errors that can affect policies.
About this task
The Cloud perspective in the IBM® CICS Explorer®, and the CICS® logs on the mainframe, can both be useful when debugging problems with policies.
Always use statistical data when you set policy thresholds; do not rely on static analysis of code.
Procedure
- If the rule in your policy is not triggering, check that
the following conditions are satisfied:
- The policy that defines the rule is deployed on the CICS region. The valid ways of deploying a policy are by either creating and installing a BUNDLE definition, or by deploying the bundle to a platform or application. If the policy is deployed on a platform or application, you can use the Cloud perspective in the IBM CICS Explorer to see all the rules that are defined for a specific scope.
- The application is installed and enabled, with an associated entry point. You can use the Cloud perspective in the IBM CICS Explorer to check which applications are installed and enabled on a platform.
- All policy scopes target operation names that are defined in the application. Rules in a policy do not trigger if the associated policy scope operation is not installed. For more details about defining entry points, see Defining application entry points in the CICS Explorer product documentation.
- Your policy is deployed on the correct level. For example, if you deploy your policy with an operation policy scope on a platform, it does not apply to application workloads. If you want your policy to apply to an application, it must either be deployed on an application level, or deployed on the platform level without a policy scope; in which case it applies to all applications.
- The application uses the resources that are being measured by the policy rule and to a level above the specified threshold. For example, if your rule is monitoring storage that is used, verify that the application uses enough storage to exceed the threshold.
- If the rule action defined is <event>:
- Check that event processing is started. DFHMP3011 message in the CICS log indicates if policy events are being lost because event processing is stopped.
- Check that the adapter or adapterset is installed. DFHMP3004, DFHMP3005 or DFHMP3006 messages in the CICS log indicate which artifacts might be missing.
- If the policy rule type is Time with an item of CPU time, verify that task was redispatched after the threshold was reached. For more information about processing that is specific to the Time policy rule type, see Policy rule types.
- If a policy rule triggers unexpectedly, perform the following
checks:
- Ensure that you set realistic policy thresholds. Set thresholds that are based on data that is collected from monitoring tools, such as CICS Performance Analyzer for z/OS®. For more information about sample forms that might help you identify appropriate threshold values, see Policies and CICS Performance Analyzer. If monitoring tools are not available, you can use some CICS monitoring data to determine policy thresholds. For more information, see CICS monitoring data for determining task rule thresholds.
- For storage and storage request policy rule types, the
threshold count includes all GETMAIN requests performed by a user
task: both explicit EXEC CICS GETMAIN
requests issued by the application, and implicit GETMAIN requests,
which include:
- Requests that occur in response to other EXEC CICS commands, for example EXEC CICS READ FILE SET.
- Storage that is obtained by Language Environment® for LE_TWA, LE_RUWA, and RUWAPOOL storage.
- For the TD Queue Request policy rule type, be aware that a number of products use EXEC CICS WRITEQ TD to write to various Transient Data Queues which might lead to a higher number of requests than you expect. For more information about the TD Queue Request policy rule type, see Policy rule types.
- Ensure that your policies are correctly scoped. If you find a policy rule is triggering more often than expected, check that the policy is correctly scoped. For example, if a policy that is scoped at the application level is triggering too often, consider defining one or more policy scopes to restrict the policy to particular operations of an application. For more information about policy scopes, see Policy scopes.
- Check whether you have duplicate rules that are defined with the same threshold and action. If so, you might get multiple messages or events when a threshold is exceeded. If the polices are deployed on a platform or application, you can use the CICS Cloud perspective in the IBM CICS Explorer to see all the rules that are defined for a specific scope.
- If you have policies that are deployed on platforms or
applications, you can use the search facility in the CICS Cloud perspective in the IBM CICS
Explorer to search for rules that are defined for a specific
scope. Sometimes, your policy search might not give the results that
you expect. Reasons why your policy search might not give the results
that you expect can include:
- At run time, rules for multiple scopes might apply. The output from a query against policy rules shows if multiple scopes apply. For more information, see Policy scopes.
- You might have duplicate policies. For example, it is possible to have the same policy name, rule name, and threshold in different bundles that are deployed to the same scope.
- The rules that are expected are not deployed at all, or are deployed to a different scope that is not included in the search criteria.
- You might experience a leak of shared storage after a task
is abended by policy processing. The leak is caused by the abended
program not releasing shared storage when it abnormally terminates. Note: Before you deploy a policy that contains an abend policy action, ensure that any tasks that might be abended as a result of the policy release any shared storage they allocate in the event of abnormal termination. The leak is a result of the abend, not of policy processing specifically; the same leak would happen if the task is abended for any other reason, for example, runaway. Programs that allocate any shared resources, such as shared storage, must ensure that they release these resources in the event of abnormal termination otherwise resource leaks occur.
What to do next
eyua7_policy_errors.html |
Last updated: Monday, 5 June 2017