2015-01-12 5 views
6

하늘색 작업자 역할 및 웹 역할 내에 사용자 지정 성능 카운터를 만들려고합니다. 웹 역할은 Azure VM에서 진단 테이블 저장소로 성능 카운터 데이터를 올바르게 수집하고 전송하지만 작업자 역할은 실패합니다. 다음과 같이 diagnostics.wadcfg 보이는Azure 작업자 역할 사용자 지정 성능 카운터

Source: perflib 
Event ID: 1010 
The Collect Procedure for the "D:\Windows\System32\winspool.drv" service in DLL "Spooler" generated an exception or returned an invalid status. The performance data returned by the counter DLL will not be returned in the Perf Data Block. The first four bytes (DWORD) of the Data section contains the exception code or status code. 


Source: perflib 
Event ID: 1008 
The Open Procedure for service "BITS" in DLL "D:\Windows\System32\bitsperf.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code. 


Source: perflib 
Event ID: 1023 
Windows cannot load the extensible counter DLL ASP.NET_2.0.50727. The first four bytes (DWORD) of the Data section contains the Windows error code. 

:

<PerformanceCounters bufferQuotaInMB="2048" scheduledTransferPeriod="PT5M"> 
    <PerformanceCounterConfiguration counterSpecifier="\Processor(_Total)\% Processor Time" sampleRate="PT30S" /> 
    <PerformanceCounterConfiguration counterSpecifier="\Memory\Available MBytes" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\Memory\Page Faults/sec" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\Process(WAWorkerHost)\Private Bytes" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\.NET CLR Memory(WAWorkerHost)\# Bytes in all Heaps" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\.NET CLR Memory(WAWorkerHost)\% Time in GC" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\Process(WAWorkerHost)\Thread Count" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\.NET CLR LocksAndThreads(WAWorkerHost)\# of current logical Threads" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\.NET CLR LocksAndThreads(WAWorkerHost)\# of current physical Threads" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\.NET CLR LocksAndThreads(WAWorkerHost)\# of current recognized threads" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\.NET CLR LocksAndThreads(WAWorkerHost)\Current Queue Length" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\Network Interface(*)\Bytes Received/sec" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\Network Interface(*)\Bytes Sent/sec" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\.NET CLR Exceptions(WAWorkerHost)\# of Exceps Thrown/sec" sampleRate="PT30S" /> 

    <!--If I comment out the following two out of the box counters, it works in the azure emulator--> 
    <PerformanceCounterConfiguration counterSpecifier="\PhysicalDisk(_Total)\Avg. Disk Write Queue Length" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\PhysicalDisk(_Total)\Avg. Disk Read Queue Length" sampleRate="PT1M" />--> 

    <PerformanceCounterConfiguration counterSpecifier="\Product\Add Product Forward Recommendation Overall Duration_AverageTimer32" sampleRate="PT1M" /> 
    <PerformanceCounterConfiguration counterSpecifier="\Product\Add Recommendations Product Handler Duration_AverageTimer32" sampleRate="PT1M" /> 
</PerformanceCounters> 
상자 성능 카운터의 밖으로 전송하는

바로 정의를 나는 다음과 같은 예외를보고하고있는 VM에 로그인하고 이벤트 로그를 확인 문제를 일으키는 원인.

두 개의 PhysicalDisk 카운터를 주석 처리하면 위에서 설명한대로 '시작'중에 성능 카운터를 만들 수 있습니다. 내 사용자 지정 카운터가 작동하는 것을 볼 수 있습니다 (단지 하늘빛이 아님).

도움을 주시면 대단히 감사하겠습니다.

감사 댄

+1

해결 했습니까? 나는이 정확한 문제가있다. 어느 시점에서 성능 카운터가 전송되었습니다. 하지만 지금은 그렇지 않으며 구성이 변경되지 않았습니다. –

답변

2

그래서 문제는 내가 확실히이 코드는 실제 웹/작업자 역할에서 고립되는 것을 실감하지 않았다 그러나 무엇을 '시작'시 설치에 코드를 성능 카운터를 실행중인였습니다 시작 후 실행 중입니다. 따라서 웹/작업자 역할이 시작되면 (예 : global.asax) 여기에서 성능 카운터를 다시 초기화해야합니다.

+1

global.asax는 IIS에서 실행되는 코드의 일부입니다. 작업자 역할에서 어떻게됩니까? – sharptooth

+0

예를 들어 웹 역할의 시나리오에서 global.asax를 말하고있었습니다. – Danjuro

관련 문제