시스템 모니터링 사용

propertyManager set 명령은 시스템 모니터링을 사용으로 설정하는 데 사용됩니다. 경고 유형이 모니터링되는 작업을 구성하고 경고를 저장하는 데 사용된 캐시 크기를 설정할 수 있습니다.

시작하기 전에

시스템 경고를 사용하려면 IBM® Health Center가 실행 중이어야 합니다.

이 태스크 정보

사용자 토폴로지에서 각 런타임 서버의 jvm.options 파일에 IBM Health Center를 추가해야 합니다. 개발 서버(cisDev)에서도 IBM Health Center를 실행할 수 있습니다. IBM Health Center는 시스템 경고를 캡처하기 위한 전제조건입니다.

시스템 모니터링을 시작하려면 글로벌 warningEnabled 특성을 true로 설정하십시오. 시스템 모니터링은 이벤트 처리 중 원래 활동을 발견할 경우 런타임 서버 또는 eXtreme Scale에서 로깅한 특정 메시지를 캡처합니다. 예를 들어, 이벤트 처리에 너무 오랜 시간이 소요되거나 에이전트에서 제한시간을 초과한 경우 런타임 경고 메시지가 로그됩니다. 힙 크기가 느리게 실행되고 가비지 콜렉션 개수가 해당 임계값에 도달하면 시스템 경고 메시지가 로그됩니다.

참고: 경고는 메모리에 보관되며 서버를 다시 시작하면 지속되지 않습니다.

프로시저

  1. 사용자 토폴로지의 cisDev 또는 각 런타임 서버의 jvm.options 파일에 IBM Health Center를 추가하십시오.
    -Xhealthcenter:level=inprocess
  2. 다음 명령을 실행하여 모든 이러한 서버에서 글로벌 경고 특성을 사용으로 설정하십시오.
    propertyManager set warningEnabled=true
    messages.log 파일을 검사하고 다음의 CWMBD0224I: System monitor logging service is enabled 메시지를 찾아 보십시오.
    참고: 시스템 특성은 시스템을 다시 시작한 후 지속됩니다.
  3. 옵션: 시스템 경고 메시지 및 런타임 경고 메시지를 사용으로 설정하십시오.
    propertyManager set warningSystemWarningEnabled=truepropertyManager set warningRuntimeWarningEnabled=true 
    messages.log 파일을 확인하고 다음 메시지를 찾으십시오.
    CWMBD0218I: systemWarning is enabled.
    CWMBD0218I: runtimeWarning is enabled.
    CWMBD0220I: The Health Center is connected and ready to listen to events.
    CWMBD0240I: The Health Center is set to event only mode.
  4. 옵션: propertyManger set 명령을 실행하여 각 런타임 경고 특성의 기본값을 편집하십시오. 다음 예제에서는 캐시를 1200개 저장할 수 있는 런타임 경고의 최대 수를 설정하는 명령을 보여줍니다.
    propertyManager set warningRuntimeWarningMaxSize=1200

결과

messages.log 파일의 각 로그 항목(LogEntry)에서 다음과 같은 경고 정보를 수신합니다. 메시지, 시간소인, 경고 유형(시스템 또는 런타임) 및 경고 레벨(경고, 오류).

다음은 시스템 경고 유형에 대한 LogEntry를 표시하는 예입니다.
LogEntry [type=systemWarning, time=1461636846077,localizedMessage=CWMBD0212W: Heap usage is running high at 90%., solutionVersion=null,level=WARNING]
LogEntry [type=systemWarning, time=1461810776931,localizedMessage=CWMBD0208W: Garbage collection frequency hit 120 times  during the last 58,062ms., solutionVersion=null, level=WARNING]
다음은 런타임 경고 유형에 대한 LogEntry를 표시하는 예입니다.
LogEntry [type=runtimeWarning, time=1461852102515,localizedMessage=CWOBJ0061W: The transaction with TxID,Local-812A0154-5D23-A8FD-0000-00505691418D, that was last running on  thread, 0264
<GetNextInput-Rolling-IA-PARTITION-7-0>, on shard  DefaultDomain:com.ibm.ia:iaMaps:7 has exceeded the configured transaction timeout value and was been marked rollback-only. This might be caused by lock contention
or application deadlock, or your  transaction timeout value is set too small., solutionVersion=null,  level=WARNING]
LogEntry [type=runtimeWarning, time=1461852132514,localizedMessage=CWMBD0205W: The warning message containing id  CWOBJ0061W will be suppressed temporarily.
It has occurred 20 times in  the last 600,000 ms., solutionVersion=null,level=WARNING]
LogEntry [type=runtimeWarning, time=1461625972119,localizedMessage=CWMBD0211W: Possible database slow down where the  transaction takes 11,363ms to complete.
SELECT EVENT, VERSION FROM  EVENTSTORE WHERE MAPNAME = ? AND EVENTID = ? AND ENTITYID = ? AND  ENTITYTYPE = ?, 4, solutionVersion=null, level=WARNING]

다음에 수행할 작업

SystemMonitorMXBean API를 사용하여 각 런타임 서버에서 캡처한 경고 메시지를 검색하십시오.자세한 정보는 SystemMonitorMXBean을 참조하십시오.