您可以使用原則規則來定義數個不同類型的臨界值。部署具有相同臨界值的多個原則規則時,觸發規則的順序是先觸發 message 動作規則,再觸發 event 動作規則,最後觸發 abend 動作規則。
規則類型 1 | 規則項目 2 | 運算子 3 | 單位 4 |
---|---|---|---|
資料庫要求 |
SQL 指令 |
大於 |
|
檔案要求 |
刪除 |
大於 |
|
程式要求 |
鏈結 |
大於 |
|
儲存體 |
24 位元作業儲存體 |
大於 |
|
儲存體要求 |
24 位元作業儲存體要求 |
大於 |
|
時間 |
CPU 限制 |
大於 |
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<policy:policy xmlns:policy="http://www.ibm.com/xmlns/prod/cics/managedplatform/policy" policySchemaRelease="0" policySchemaVersion="1">
<description>Example platform policy to monitor task storage and file read counts</description>
<userTag>exmp_1</userTag> thru <userTag>exmp_3</userTag>
<rule type="storage" 1 >
<name>TooMuch24BitStorage</name>
<description>Issue DFHMP3001 msg when a task allocate more than 1024 bytes of 24 bit task storage</description>
<storageUsedCondition item="task24" 2 operator="GT" 3 value="1" unit="K" 4 />
<action>
<message/>
</action>
</rule>
<rule type="filerequest" 1 >
<name>TooManyReads</name>
<description>Issue DFHMP3001 msg when a task does more than 50 reads</description>
<fileRequestCondition item="read" 2 operator="GT" 3 value="50" unit="" 4 />
<action>
<message/>
</action>
</rule>
</policy:policy>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<policy:policy xmlns:policy="http://www.ibm.com/xmlns/prod/cics/managedplatform/policy" policySchemaRelease="0" policySchemaVersion="1">
<description>Policy to monitor the number of file reads</description>
<userTag>fcpol_1</userTag>
<rule type="filerequest" 1 >
<name>File_Reads</name>
<description>Abend the task if the file read limit exceeded</description>
<fileRequestCondition item="read" 2 operator="GT" 3 value="10" unit="K" 4 />
<action>
<abend/>
</action>
</rule>
<rule type="filerequest" 1 >
<name>File Write</name>
<description>Abend the task with specified abend code CFI1 if the file write limit exceeded</description>
<fileRequestCondition item="write" 2 operator="GT" 3 value="5" unit="K" 4 />
<action>
<abend abendCode="CFI1"/>
</action>
</rule>
</policy:policy>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<policy:policy xmlns:policy="http://www.ibm.com/xmlns/prod/cics/managedplatform/policy" policySchemaRelease="0" policySchemaVersion="1">
<description>Policy to monitor the number of file reads</description>
<userTag>fcpol_1</userTag>
<rule type="filerequest" 1 >
<name>File Write</name>
<description>The file write limitation policy</description>
<fileRequestCondition item="write" 2 operator="GT" 3 value="500" unit="" 4 />
<action>
<event>
<eventAdapterName>adapterB</eventAdapterName>
</event>
</action>
</rule>
<rule type="filerequest" 1 >
<name>File_Reads</name>
<description>File read limitation policy</description>
<fileRequestCondition item="read" 2 operator="GT" 3 value="100" unit="" 4 />
<action>
<event>
<eventAdapterSetName>adaSetA</eventAdapterSetName>
</event>
</action>
</rule>
</policy:policy>