Azure 角色中缓存故障排除和诊断

重要

Microsoft 建议所有新开发使用 Azure Redis 缓存。 有关选择 Azure 缓存产品/服务的当前文档和指南,请参阅 哪个 Azure 缓存产品/服务适合我?

In-Role缓存应用程序配置为使用诊断级别进行诊断数据收集。 此诊断级别为配置数据收集级别提供了单一设置。 本主题概述In-Role缓存应用程序的故障排除步骤和诊断。

In-Role缓存应用程序的故障排除和诊断

在 Azure 上运行的应用程序分布广泛,多实例应用程序可能难以调试。 这些类型的应用程序需要除标准工具和方法以外的工具和方法进行疑难解答。 对 Azure 应用程序进行故障排除超出了本主题的范围,但在 Azure 中的诊断和调试中提供了更多信息。 本主题讨论经过验证的故障排除做法,并包含指向更密集的信息和最佳做法的链接。 有关收集诊断数据后查看诊断数据的详细信息,请参阅Microsoft Store并在Azure 存储中查看诊断数据

配置In-Role缓存应用程序以收集诊断数据进行故障排除需要配置诊断级别并在角色启动期间配置缓存诊断。 本主题概述了用于排查In-Role缓存应用程序的这些步骤。

  • 配置诊断级别

    • 缓存服务器诊断级别

    • 缓存客户端诊断级别

  • 配置缓存诊断

  • 按诊断级别列出的性能计数器

配置诊断级别

In-Role缓存提供五个诊断级别,用于配置诊断数据收集量。 诊断级别的范围为 0 至 4,数字表示为缓存服务器和客户端收集的诊断信息量。 每个诊断级别都包含一组预先配置的性能计数器、事件日志、跟踪和故障转储设置,这些设置可用于监视In-Role缓存应用程序的运行状况。

诊断级别 所收集的诊断数据

0

仅限非常关键/灾难性的服务器日志。

1

可帮助评估使用模式、缓存系统健康状况和任何潜在错误的诊断数据。 这是默认配置级别。

2

所有请求的细粒度诊断数据和重要系统信息。

3

更详细的诊断数据和系统信息。

4

所有请求的最详细日志和系统信息。

有两种类型的缓存诊断级别对应于缓存客户端和缓存服务器诊断。 DiagnosticLevel 表示缓存服务器诊断, ClientDiagnosticLevel 表示缓存客户端诊断。 每个级别均配置一组不同的性能计数器、日志、跟踪和故障转储设置。 这些诊断级别在应用程序的 ServiceConfiguration.cscfg 文件中进行配置,并且只需部署更新的 ServiceConfiguration.cscfg 文件便可针对正在运行的云应用程序做出更改。

  • 缓存服务器诊断级别

  • 缓存客户端诊断级别

缓存服务器诊断级别

可以在 ServiceConfiguration.cscfg 文件中托管缓存群集的角色的配置部分指定缓存群集的缓存服务器诊断级别。 在角色的“Caching”选项卡中启用缓存时,Visual Studio会添加此设置,并且当缓存辅助角色添加到项目中时,该设置已存在。 默认 DiagnosticLevel 为 1,如果角色不存在 DiagnosticLevel ,则使用 DiagnosticLevel 为 1。 若要更改 DiagnosticLevel,请修改 ServiceConfiguration.cscfg 中角色的 DiagnosticLevel 设置。 以下示例是 WorkerRole1 ServiceConfiguration.cscfg 文件中的一节,其 DiagnosticLevel 为 1。

<Role name="WorkerRole1">
  <Instances count="1" />
  <ConfigurationSettings>
    <!-- Other settings omitted for clarity... -->
    <Setting name="Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel" value="1" />
  </ConfigurationSettings>
</Role>

下表列出了为每个诊断级别收集的诊断数据。

DiagnosticLevel 收集的数据

0

  • 日志级别: 严重

  • 无性能计数器

  • 不注册事件日志

  • 微型故障转储

1

  • 日志级别: 警告

  • 服务器诊断级别 1 性能计数器

  • 注册了以下事件日志

    • Application!*[System/Provider/@Name='CacheService']

    • Application!*[System/Provider/@Name='.NET Runtime']

  • 微型故障转储

2

  • 日志级别: 信息

  • 服务器诊断级别 2 性能计数器

  • 除了诊断级别 1 的事件日志外,还注册了以下事件日志

    • Azure!*

    • Microsoft-Windows-Application Server-System Services/Admin!*

    • Microsoft-Windows-Application Server-System Services/Operational!*

  • 完全故障转储

3

  • 日志级别: 信息

  • 服务器诊断级别 3 和 4 的性能计数器

  • 与诊断级别 2 相同的事件日志

  • 完全故障转储

4

  • 日志级别: 详细

  • 服务器诊断级别 3 和 4 的性能计数器

  • 与诊断级别 2 相同的事件日志

  • 完全故障转储

注意

在 Azure 模拟器中运行In-Role缓存应用程序时,即使有多个角色实例,也会在 *_IN_0 文件夹下收集所有角色实例的跟踪。 此行为是设计使然。 In-Role缓存应用程序托管在 Azure 中时,每个角色实例的跟踪位于角色实例的相应文件夹中。

缓存客户端诊断级别

缓存客户端的 ClientDiagnosticLevel 级别在 ServiceConfiguration.cscfg 中指定,在作为缓存客户端的角色的配置部分中指定。 当角色配置为充当缓存客户端时,In-Role缓存NuGet包会添加此设置。

注意

有关使用 In-Role 缓存NuGet包配置缓存客户端的详细信息,请参阅为角色上的Caching配置Project

默认 ClientDiagnosticLevel 为 1,如果角色不存在 ClientDiagnosticLevel ,则使用 ClientDiagnosticLevel 1。 若要更改 ClientDiagnosticLevel,请修改 ServiceConfiguration.cscfg 中角色的 ClientDiagnosticLevel 设置。 以下示例是 WebRole1 ServiceConfiguration.cscfg 文件中的节,其 ClientDiagnosticLevel 为 1。

<Role name="WebRole1">
  <Instances count="1" />
  <ConfigurationSettings>
    <!-- Other settings omitted for clarity... -->
    <Setting name="Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel" value="1" />
  </ConfigurationSettings>
</Role>

下表列出了为每个客户端诊断级别收集的诊断数据。

注意

客户端诊断级别所对应的故障转储设置仅与使用 Memcached 客户端填充程序的缓存客户端有关。 对于非 Memcache 客户端,不会收集故障转储。 有关 Memcached 客户端填充码的详细信息,请参阅 Azure In-Role 缓存的 Memcached 包装器

ClientDiagnosticLevel 收集的数据

0

  • 日志级别: 严重

  • 无性能计数器

  • 不注册事件日志

  • 微型故障转储

1

  • 日志级别: 警告

  • 客户端诊断级别 1 性能计数器

  • 不注册事件日志

  • 微型故障转储

2

  • 日志级别: 信息

  • 客户端诊断级别 2、3 和 4 的性能计数器

  • 不注册事件日志

  • 完全故障转储

3

  • 日志级别: 信息

  • 客户端诊断级别 2、3 和 4 的性能计数器

  • 不注册事件日志

  • 完全故障转储

4

  • 日志级别: 详细

  • 客户端诊断级别 2、3 和 4 的性能计数器

  • 不注册事件日志

  • 完全故障转储

注意

在 Azure 模拟器中运行In-Role缓存应用程序时,即使有多个角色实例,也会在 *_IN_0 文件夹下收集所有角色实例的跟踪。 此行为是设计使然。 In-Role缓存应用程序托管在 Azure 中时,每个角色实例的跟踪位于角色实例的相应文件夹中。

配置缓存诊断

用于配置缓存诊断的步骤会因所用的 Azure SDK 版本而异。

  • 使用 Azure SDK 2.5 或更高版本配置缓存诊断

  • 使用 Azure SDK 2.4 或更低版本配置缓存诊断

使用 Azure SDK 2.5 或更高版本配置缓存诊断

使用 Azure SDK 2.5 或更高版本时,使用 diagnostics.wadcfgx 文件配置缓存诊断。 使用 Visual Studio 中的“诊断配置”对话框配置诊断时,这些文件会自动添加到你的 Visual Studio 项目中。 一个 diagnostics.wadcfgx 文件将添加到参与缓存的每个角色(作为客户端或服务器)中。 对于并置缓存角色,客户端和服务器设置将包含在同一 diagnostics.wadcfgx 文件中。 有关使用“诊断配置”对话框配置诊断的指导,请参阅为 Azure 云服务 和虚拟机配置诊断

使用“诊断配置”对话框配置诊断后,需要注意配置缓存诊断的一些其他注意事项。

应用程序日志在“诊断配置”对话框的“应用程序日志”选项卡中配置。 缓存服务器应用程序日志的配置在 DataSources 文件的 diagnostics.wadcfxg 节中配置。

<DataSources>
  <DirectoryConfiguration containerName="wad-custom-logs">
    <LocalResource name="DiagnosticStore" relativePath="AzureCaching\ServiceLogs\Upload" />
  </DirectoryConfiguration>
</DataSources>

缓存服务器客户端应用程序日志的配置使用“诊断配置”对话框的“应用程序日志”选项卡中的设置进行配置。 所用的级别是该对话框上的“日志级别”设置和 ClientDiagnosticLevel 文件中配置的 .cscfg 中的较低值。 若要收集更高级别的缓存服务器应用程序日志数据,请确保这两个值都设为相应的级别。

生成的性能计数器数据取决于缓存客户端的 Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel 和缓存服务器的 Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel 中指定的级别。 将性能计数器指标传输到存储时,只传输 diagnostics.wadcfxg 文件中列出的指标,如下面的示例 diagnostics.wadcfxg 文件中所示。

<?xml version="1.0" encoding="utf-8"?>
<DiagnosticsConfiguration xmlns="https://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
  <PublicConfig xmlns="https://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
    <WadCfg>
      <DiagnosticMonitorConfiguration overallQuotaInMB="4096">
        <DiagnosticInfrastructureLogs scheduledTransferLogLevelFilter="Error" />
        <Directories scheduledTransferPeriod="PT1M">
          <IISLogs containerName="wad-iis-logfiles" />
          <FailedRequestLogs containerName="wad-failedrequestlogs" />
        </Directories>
        <PerformanceCounters scheduledTransferPeriod="PT1M">
          <PerformanceCounterConfiguration counterSpecifier="\Processor(_Total)\% Processor Time" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\Memory\Available MBytes" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\ISAPI Extension Requests/sec" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\Bytes Total/Sec" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Requests/Sec" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Errors Total/Sec" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Queued" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Rejected" sampleRate="PT3M" />
          <!--Cache Client Performance counters-->
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Client Host\Requests" sampleRate="PT1M" />
        </PerformanceCounters>
        <WindowsEventLog scheduledTransferPeriod="PT1M">
          <DataSource name="Application!*" />
        </WindowsEventLog>
        <CrashDumps>
          <CrashDumpConfiguration processName="WaIISHost.exe" />
          <CrashDumpConfiguration processName="WaWorkerHost.exe" />
          <CrashDumpConfiguration processName="w3wp.exe" />
        </CrashDumps>
        <Logs scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Verbose" />
      </DiagnosticMonitorConfiguration>
    </WadCfg>
    <StorageAccount />
  </PublicConfig>
  <PrivateConfig xmlns="https://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
    <StorageAccount endpoint="" />
  </PrivateConfig>
  <IsEnabled>true</IsEnabled>
</DiagnosticsConfiguration>
<?xml version="1.0" encoding="utf-8"?>
<DiagnosticsConfiguration xmlns="https://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
  <PublicConfig xmlns="https://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
    <WadCfg>
      <DiagnosticMonitorConfiguration overallQuotaInMB="4096">
        <DiagnosticInfrastructureLogs scheduledTransferLogLevelFilter="Verbose" />
        <Directories scheduledTransferPeriod="PT1M">
          <IISLogs containerName="wad-iis-logfiles" />
          <FailedRequestLogs containerName="wad-failedrequestlogs" />
          <!--Cache Server Logs-->
          <DataSources>
            <DirectoryConfiguration containerName="wad-custom-logs">
              <LocalResource relativePath="." name="DiagnosticStore" />
            </DirectoryConfiguration>
          </DataSources>
        </Directories>
        <PerformanceCounters scheduledTransferPeriod="PT1M">
          <PerformanceCounterConfiguration counterSpecifier="\Processor(_Total)\% Processor Time" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\Memory\Available MBytes" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\ISAPI Extension Requests/sec" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\Bytes Total/Sec" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Requests/Sec" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Errors Total/Sec" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Queued" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Rejected" sampleRate="PT3M" />
          <!--Cache Performance Counter-->
          <PerformanceCounterConfiguration counterSpecifier="\Windows Azure Caching:Host\Total Client Requests" sampleRate="PT1M" />
        </PerformanceCounters>
        <WindowsEventLog scheduledTransferPeriod="PT1M">
          <DataSource name="Application!*" />
        </WindowsEventLog>
        <CrashDumps dumpType="Full">
          <CrashDumpConfiguration processName="WaAppAgent.exe" />
          <CrashDumpConfiguration processName="WaIISHost.exe" />
          <CrashDumpConfiguration processName="WindowsAzureGuestAgent.exe" />
          <CrashDumpConfiguration processName="WaWorkerHost.exe" />
          <CrashDumpConfiguration processName="DiagnosticsAgent.exe" />
          <CrashDumpConfiguration processName="w3wp.exe" />
          <!--Cache Service Dump-->
          <CrashDumpConfiguration processName="CacheService.exe" />
        </CrashDumps>
        <Logs scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Verbose" />
      </DiagnosticMonitorConfiguration>
    </WadCfg>
    <StorageAccount />
  </PublicConfig>
  <PrivateConfig xmlns="https://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
    <StorageAccount endpoint="" />
  </PrivateConfig>
  <IsEnabled>true</IsEnabled>
</DiagnosticsConfiguration>

使用 Azure SDK 2.4 或更低版本配置缓存诊断

若要使用 Azure SDK 2.4 或更低版本启动缓存诊断数据收集,必须在角色启动过程中调用以下代码。 要收集缓存诊断数据,必须将此代码添加到作为缓存客户端或缓存服务器的每个角色。 托管此代码的一个方便位置位于角色的 OnStart 替代中,如以下示例所示。

public override bool OnStart()
{
    DiagnosticMonitorConfiguration dmConfig = 
        DiagnosticMonitor.GetDefaultInitialConfiguration();

    // Configure the collection of cache diagnostic data.
    CacheDiagnostics.ConfigureDiagnostics(dmConfig);

    DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", 
        dmConfig);

    return base.OnStart();
}
Public Overrides Function OnStart() As Boolean

    ' Existing OnStart override code omitted for clarity.

    Dim dmConfig As DiagnosticMonitorConfiguration = _
        DiagnosticMonitor.GetDefaultInitialConfiguration()

    ' Configure the collection of cache diagnostic data.
    CacheDiagnostics.ConfigureDiagnostics(dmConfig)

    DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", _
        dmConfig)

    Return MyBase.OnStart()

End Function

ConfigureDiagnostics 方法配置缓存诊断数据的集合。 如果未调用此方法,则不会收集缓存诊断数据。 若要使用 CacheDiagnostics 类,请添加对位于 C:\Program Files\Microsoft SDK\Azure\.NET SDK\2012-10\ref\Caching 中的Microsoft.ApplicationServer.Caching.AzureCommon.dll的引用,并使用 (或Imports) 语句添加以下内容。

using Microsoft.ApplicationServer.Caching.AzureCommon;
Imports Microsoft.ApplicationServer.Caching.AzureCommon

注意

如果使用 In-Role 缓存NuGet包将角色配置为缓存客户端,则已添加Microsoft.ApplicationServer.Caching.AzureCommon.dll程序集引用。

如果要将缓存添加到现有角色,并且诊断配置代码已存在,则可以将调用添加到 O:Microsoft.ApplicationServer。Caching。在调用 O:Microsoft.WindowsAzure.Diagnostics.Diagnostics.DiagnosticMonitor 之前,将 AzureCommon.CacheDiagnostics.ConfigureDiagnostics 配置为现有诊断启动代码。"开始"菜单。

警告

调用这两个 O:Microsoft.ApplicationServer。Caching。AzureCommon.CacheDiagnostics.ConfigureDiagnostics 和 ) :Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor。In-Role缓存应用程序中的诊断数据收集需要"开始"菜单。 如果在角色启动期间未同时调用这两个方法,将不收集缓存诊断数据。

按诊断级别列出的性能计数器

以下各节包含每个服务器和客户端诊断级别提供的性能计数器的列表。 包括In-Role缓存和性能计数器。 有关包含In-Role缓存性能计数器说明的完整列表,请参阅 监视 Azure In-Role 缓存。 有关性能计数器的详细信息,请参阅.NET Framework中的性能计数器

  • 服务器诊断级别 1 性能计数器

  • 服务器诊断级别 2 性能计数器

  • 服务器诊断级别 3 和 4 的性能计数器

  • 客户端诊断级别 1 性能计数器

  • 客户端诊断级别 2、3 和 4 的性能计数器

服务器诊断级别 1 性能计数器

DiagnosticLevel 1 包含以下性能计数器。

  • \Azure Caching:Host\Average Secondary Response Time / operation Microsecond

  • \Azure Caching:Host\Total Data Size Bytes

  • \Azure Caching:Host\Total Client Requests

  • \Azure Caching:Host\Total Read Requests

  • \Azure Caching:Host\Total Object Count

  • \Azure Caching:Host\Total Failure Exceptions

  • \Memory\Available MBytes

  • \Process(CacheService)\Page Faults/sec

    • 在 Azure 模拟器中运行时,计数器名称为 \Process (CacheServiceEmulator) \Page Faults/sec
  • \Processor(_Total)\% Processor Time

  • \.NET CLR Memory(_Global_)\% Time in GC

服务器诊断级别 2 性能计数器

DiagnosticLevel 2 包含以下性能计数器。

  • \Azure Caching:Host\Average Secondary Response Time / operation Microsecond

  • \Azure Caching:Host\Total Data Size Bytes

  • \Azure Caching:Host\Total Client Requests

  • \Azure Caching:Host\Total Read Requests

  • \Azure Caching:Host\Total Object Count

  • \Azure Caching:Host\Total Failure Exceptions

  • \Processor(_Total)\% Processor Time

  • \.NET CLR Memory(_Global_)\% Time in GC

  • \Azure Caching:Host\Total Read Requests /sec

  • \Azure Caching:Host\Cache Miss Percentage

  • \Azure Caching:Host\Total Primary Data Size Bytes

  • \Azure Caching:Host\Total Allocated Directory Count

  • \Azure Caching:Host\Available Cache Item Percentage

  • \Azure Caching:Host\Total Available Cache Item Count

  • \Azure Caching:Host\Total Notification Delivered

  • \Azure Caching:Host\Total Eviction Runs

  • \Azure Caching:Host\Total Memory Evicted

  • \Azure Caching:Host\Total Evicted Objects

  • \Azure Caching:Host\Total Expired Objects

  • \Azure Caching:Host\Total Requests Served

  • \Azure Caching:Host\Total Write Operations

  • \.NET CLR LocksAndThreads(*)\Contention Rate / sec

  • \.NET CLR Memory(*)\% Time in GC

  • \.NET CLR Memory(*)\Gen 0 heap size

  • \.NET CLR 内存 (*) \Gen 1 堆大小

  • \.NET CLR 内存 (*) \Gen 2 堆大小

  • \.NET CLR Memory(*)\Large Object Heap size

  • \Memory\Available MBytes

  • \Process(CacheService)\Page Faults/sec

    • 在 Azure 模拟器中运行时,计数器名称为 \Process (CacheServiceEmulator) \Page Faults/sec
  • \Process(*)\Thread Count

  • \Process(*)\Working Set

  • \Process(*)\Virtual Bytes

  • \Process(*)\Elapsed Time

  • \Process(*)\Page Faults/sec

  • \Network Interface(*)\Current Bandwidth

  • \Network Interface(*)\Bytes Total/sec

  • \Azure Caching:Host\Total Connections Count

  • \Azure Caching:Host\Average Quorum Response Time / operation Microsecond

  • \Azure Caching:Host\Total Client Requests /sec

  • \Azure Caching:Host\Total Notification Delivered

  • \Azure Caching:Host\Total Get Misses

  • \Azure Caching:Host\Total Write Operations /sec

服务器诊断级别 3 和 4 的性能计数器

DiagnosticLevel 3 和 DiagnosticLevel 4 包含以下性能计数器。

  • \.NET CLR LocksAndThreads(*)\Contention Rate / sec

  • \.NET CLR LocksAndThreads(*)\Current Queue Length

  • \.NET CLR Memory(*)\# Bytes in all Heaps

  • \.NET CLR Memory(*)\# Gen 0 Collections

  • \.NET CLR 内存 (*) \# 第 1 代集合

  • \.NET CLR 内存 (*) \# 第 2 代集合

  • \.NET CLR Memory(*)\% Time in GC

  • \.NET CLR Memory(*)\Gen 0 heap size

  • \.NET CLR 内存 (*) \Gen 1 堆大小

  • \.NET CLR 内存 (*) \Gen 2 堆大小

  • \.NET CLR Memory(*)\Large Object Heap size

  • \.NET CLR Exceptions(*)\# of Exceps Thrown

  • \Memory\Available MBytes

  • \Memory\Page Faults/sec

  • \PhysicalDisk(_Total)\% Idle Time

  • \PhysicalDisk(_Total)\Avg.磁盘队列长度

  • \Processor(_Total)\% Privileged Time

  • \Processor(_Total)\% Processor Time

  • \System\Context Switches/sec

  • \System\Processor Queue Length

  • \Process(*)\% Processor Time

  • \Process(*)\Handle Count

  • \Process(*)\Private Bytes

  • \Process(*)\Thread Count

  • \Process(*)\Working Set

  • \Process(*)\Virtual Bytes

  • \Process(*)\Elapsed Time

  • \Process(*)\Page Faults/sec

  • \Process(CacheService)\Page Faults/sec

    • 在模拟器中运行时,计数器名称为 \Process (CacheServiceEmulator) \Page Faults/sec
  • \Network Interface(*)\Current Bandwidth

  • \Network Interface(*)\Packets/sec

  • \Network Interface(*)\Bytes Sent/sec

  • \Network Interface(*)\Bytes Received/sec

  • \Network Interface(*)\Bytes Total/sec

  • \System\System Up Time

  • \Azure Caching:Host\Available Cache Item Percentage

  • \Azure Caching:Host\Total Connections Count

  • \Azure Caching:Host\Available Directory Percentage

  • \Azure Caching:Host\Available Memory Percentage

  • \Azure Caching:Host\Average Quorum Response Time / operation Microsecond

  • \Azure Caching:Host\Average Secondary Response Time / operation Microsecond

  • \Azure Caching:Host\Cache Miss Percentage

  • \Azure Caching:Host\Gateway Process Time

  • \Azure Caching:Host\Gateway Failure Percentage

  • \Azure Caching:Host\Request Processing Error Percentage

  • \Azure Caching:Host\Total Allocated Cache Item Count

  • \Azure Caching:Host\Total Allocated Directory Count

  • \Azure Caching:Host\Total Available Cache Item Count

  • \Azure Caching:Host\Total Available Directory Count

  • \Azure Caching:Host\Total Available Memory Bytes

  • \Azure Caching:Host\Total Cache Misses

  • \Azure Caching:Host\Total Cache Misses /sec

  • \Azure Caching:Host\Total Client Requests

  • \Azure Caching:Host\Total Client Requests /sec

  • \Azure Caching:Host\Total Data Size Bytes

  • \Azure Caching:Host\Total Evicted Objects

  • \Azure Caching:Host\Total Eviction Runs

  • \Azure Caching:Host\Total Expired Objects

  • \Azure Caching:Host\Total Failure Exceptions

  • \Azure Caching:Host\Total Failure Exceptions /sec

  • \Azure Caching:Host\Total Memory Evicted

  • \Azure Caching:Host\Total Notification Delivered

  • \Azure Caching:Host\Total Notification Delivered /sec

  • \Azure Caching:Host\Total Notification Poll Requests

  • \Azure Caching:Host\Total Notification Poll Requests /sec

  • \Azure Caching:Host\Total Object Count

  • \Azure Caching:Host\Total Objects Returned

  • \Azure Caching:Host\Total Objects Returned /sec

  • \Azure Caching:Host\Total Primary Data Size Bytes

  • \Azure Caching:Host\Total Get Misses

  • \Azure Caching:Host\Total Get Misses /sec

  • \Azure Caching:Host\Total Get Requests

  • \Azure Caching:Host\Total Get Requests /sec

  • \Azure Caching:Host\Total GetAndLock Requests

  • \Azure Caching:Host\Total GetAndLock Requests /sec

  • \Azure Caching:Host\Total Memory Evicted

  • \Azure Caching:Host\Total Read Requests

  • \Azure Caching:Host\Total Read Requests /sec

  • \Azure Caching:Host\Total Requests Served

  • \Azure Caching:Host\Total Requests Served /sec

  • \Azure Caching:Host\Total Retry Exception

  • \Azure Caching:Host\Total Retry Exception /sec

  • \Azure Caching:Host\Total Secondary Data Size Bytes

  • \Azure Caching:Host\Total Successful GetAndLock Requests

  • \Azure Caching:Host\Total Successful GetAndLock Requests /sec

  • \Azure Caching:Host\Total Write Operations

  • \Azure Caching:Host\Total Write Operations /sec

客户端诊断级别 1 性能计数器

ClientDiagnosticLevel 1 包含以下性能计数器。

  • \Azure Caching:Client Host\Failure Exceptions

  • \Azure Caching:Client Host\Total Local Cache Hits

  • \Azure Caching:Client Host\Current Server Connections

  • \Azure Caching:Client Host\Average Get Latency / operation Microsecond

  • \Azure Caching:Client Host\Average Put Latency / operation Microsecond

  • \Azure Caching:Client Host\Retry Exceptions

  • \Azure Caching:Client Host\Timeout Exceptions

  • \Azure Caching:Client Host\Requests

  • \Processor(_Total)\% Processor Time

  • \.NET CLR Memory(_Global_)\% Time in GC

  • \Azure Caching:Client(*)\Failure Exceptions

  • \Azure Caching:Client(*)\Total Local Cache Hits

  • \Azure Caching:Client(*)\Current Server Connections

  • \Azure Caching:Client(*)\Average Get Latency / operation Microsecond

  • \Azure Caching:Client(*)\Average Put Latency / operation Microsecond

  • \Azure Caching:Client(*)\Retry Exceptions

  • \Azure Caching:Client(*)\Timeout Exceptions

  • \Azure Caching:Client(*)\Requests

客户端诊断级别 2、3 和 4 的性能计数器

ClientDiagnosticLevel 2、3 和 4 包含以下性能计数器。

  • \Azure Caching:Client Host\Requests

  • \Azure Caching:Client Host\Requests / sec

  • \Azure Caching:Client Host\Server Responses Dropped / sec

  • \Azure Caching:Client Host\Failure Exceptions

  • \Azure Caching:Client Host\Failure Exceptions / sec

  • \Azure Caching:Client Host\Average Get Latency / operation Microsecond

  • \Azure Caching:Client Host\Average Put Latency / operation Microsecond

  • \Azure Caching:Client Host\Average Get Latency (Network) / operation Microsecond

  • \Azure Caching:Client Host\Read Requests

  • \Azure Caching:Client Host\Write Requests

  • \Azure Caching:Client Host\Bytes Received / sec

  • \Azure Caching:Client Host\Bytes Sent / sec

  • \Azure Caching:Client Host\Current Server Connections

  • \Azure Caching:Client Host\Local Cache Filled Percentage

  • \Azure Caching:Client Host\Local Cache Hits Percentage

  • \Azure Caching:Client Host\Total Local Cache Hits

  • \Azure Caching:Client Host\Total Local Cache Objects

  • \Azure Caching:Client Host\Total Notifications Received

  • \Azure Caching:Client Host\Timeout Exceptions

  • \Azure Caching:Client Host\Timeout Exceptions / sec

  • \Azure Caching:Client Host\Retry Exceptions

  • \Azure Caching:Client Host\Retry Exceptions / sec

  • \Azure Caching:Client Host\Total Connection Requests Failed

  • \Azure Caching:Client Host\Network Exceptions

  • \Azure Caching:Client Host\Network Exceptions / sec

  • \Azure Caching:Client Host\Current Waiting Requests

  • \Processor(_Total)\% Processor Time

  • \.NET CLR Memory(_Global_)\% Time in GC

  • \Azure Caching:Client(*)\Requests

  • \Azure Caching:Client(*)\Requests / sec

  • \Azure Caching:Client(*)\Server Responses Dropped / sec

  • \Azure Caching:Client(*)\Failure Exceptions

  • \Azure Caching:Client(*)\Failure Exceptions / sec

  • \Azure Caching:Client(*)\Average Get Latency / operation Microsecond

  • \Azure Caching:Client(*)\Average Put Latency / operation Microsecond

  • \Azure Caching:Client(*)\Average Get Latency (Network) / operation Microsecond

  • \Azure Caching:Client(*)\Read Requests

  • \Azure Caching:Client(*)\Write Requests

  • \Azure Caching:Client(*)\Bytes Received / sec

  • \Azure Caching:Client(*)\Bytes Sent / sec

  • \Azure Caching:Client(*)\Current Server Connections

  • \Azure Caching:Client(*)\Local Cache Filled Percentage

  • \Azure Caching:Client(*)\Local Cache Hits Percentage

  • \Azure Caching:Client(*)\Total Local Cache Hits

  • \Azure Caching:Client(*)\Total Local Cache Objects

  • \Azure Caching:Client(*)\Total Notifications Received

  • \Azure Caching:Client(*)\Timeout Exceptions

  • \Azure Caching:Client(*)\Timeout Exceptions / sec

  • \Azure Caching:Client(*)\Retry Exceptions

  • \Azure Caching:Client(*)\Retry Exceptions / sec

  • \Azure Caching:Client(*)\Total Connection Requests Failed

  • \Azure Caching:Client(*)\Network Exceptions

  • \Azure Caching:Client(*)\Network Exceptions / sec

  • \Azure Caching:Client(*)\Current Waiting Requests

另请参阅

参考

Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor

概念

监视 Azure 角色中缓存

其他资源

.NET Framework 中的性能计数器
Azure 中的诊断和调试