정책 임계값

정책 규칙을 사용하여 여러 다른 유형의 임계값을 정의할 수 있습니다. 임계값이 같은 여러 정책 규칙이 배치될 때 규칙이 트리거되는 순서는 먼저 메시지 조치 규칙, 이벤트 조치 규칙 그리고 마지막으로 이상 종료 조치 규칙입니다.

지원되는 규칙 유형 세부사항

표 1. 지원되는 규칙 유형 세부사항
규칙 유형  1  규칙 항목  2  연산자  3  단위  4 

데이터베이스 요청

SQL 명령

초과

""
요청
K
1000개의 요청

파일 요청

삭제
읽기
다음 읽기
이전 읽기
업데이트 읽기
다시 쓰기
찾아보기 시작
쓰기

초과

""
요청
K
1000개의 요청

프로그램 요청

링크

초과

""
요청
K
1000개의 요청

스토리지

24비트 태스크 스토리지
31비트 태스크 스토리지
64비트 태스크 스토리지
24비트 공유 스토리지
31비트 공유 스토리지
64비트 공유 스토리지

초과

B
바이트
K
킬로바이트
M
메가바이트
G
기가바이트

스토리지 요청

24비트 태스크 스토리지 요청
31비트 태스크 스토리지 요청
64비트 태스크 스토리지 요청
24비트 공유 스토리지 요청
31비트 공유 스토리지 요청
64비트 공유 스토리지 요청

초과

""
요청
K
1000개의 요청

시간

CPU 한계

초과

O
마이크로초
M
밀리초
S
참고: 단위를 선택하고 정책 규칙의 임계값에 값을 지정할 때 단위 크기가 증가함에 따라 세분성이 감소함에 유의하십시오. 더 높은 단위로 큰 값을 지정할 수 없는 경우 더 낮은(작은) 단위를 사용하여 적합한 값을 지정할 수도 있습니다. 예를 들어, 스토리지 유형 정책 규칙을 작성 중이며 "G"(기가바이트)를 단위로 사용하여 임계값을 설정할 수 없는 경우 "M"(메가바이트)을 단위로 사용하고 정책 마법사의 필드에 해당하는 메가바이트 값을 입력하여 임계값을 설정할 수 있습니다.

예제

다음 예제는 스토리지 및 filerequest 정책에 대한 XML을 나열합니다. 태스크가 1024바이트를 초과한 24비트 태스크 스토리지를 할당할 때에나 태스크가 50번이 넘는 파일 읽기를 수행할 때 정책이 DFHMP3001 메시지를 발행합니다.
<?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>
다음 예제는 태스크를 이상 종료하는 filerequest 정책에 대한 XML을 나열합니다. 정책은 태스크가 10000번이 넘는 파일 읽기를 수행하는 경우 기본 이상 종료 코드 AMPB로 태스크를 이상 종료하거나, 태스크가 5000번이 넘는 파일 쓰기를 수행하는 경우 사용자 지정 이상 종료 코드 CFI1로 태스크를 이상 종료합니다. 이상 종료와 함께 DFHMP3002 메시지가 발행됩니다.
<?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>
다음 예제는 이벤트를 발행하는 filerequest 정책에 대한 XML을 나열합니다. 정책은 태스크가 500번이 넘는 파일 쓰기를 수행하면 adapterB라는 이벤트 어댑터에 이벤트를 발행하고 태스크가 100번이 넘는 파일 읽기를 수행하면 adaSetA라는 이벤트 어댑터 세트에 이벤트를 발행합니다.
<?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>
표 1에 표시된 규칙 유형 세부사항을 XML 매개변수와 값으로 맵핑하는 방식에 대한 자세한 정보는 정책 XML 요소 이름 및 속성 값을 참조하십시오.