我想在Sql Server上收集磁盘IO指标。由于某些原因,我无法获得Resource Pool Stats
的计数器:
[db_server]: PS C:> Get-Counter -ListSet '*Resource Pool Stats*' | select -ExpandProperty pathsWIthInstances
\SQLServer:Resource Pool Stats(*)\CPU usage %
\SQLServer:Resource Pool Stats(*)\CPU usage target %
\SQLServer:Resource Pool Stats(*)\CPU control effect %
\SQLServer:Resource Pool Stats(*)\CPU effective %
\SQLServer:Resource Pool Stats(*)\CPU delayed %
\SQLServer:Resource Pool Stats(*)\CPU violated %
\SQLServer:Resource Pool Stats(*)\Compile memory target (KB)
\SQLServer:Resource Pool Stats(*)\Cache memory target (KB)
\SQLServer:Resource Pool Stats(*)\Query exec memory target (KB)
\SQLServer:Resource Pool Stats(*)\Memory grants/sec
\SQLServer:Resource Pool Stats(*)\Active memory grants count
\SQLServer:Resource Pool Stats(*)\Memory grant timeouts/sec
\SQLServer:Resource Pool Stats(*)\Active memory grant amount (KB)
\SQLServer:Resource Pool Stats(*)\Pending memory grants count
\SQLServer:Resource Pool Stats(*)\Max memory (KB)
\SQLServer:Resource Pool Stats(*)\Used memory (KB)
\SQLServer:Resource Pool Stats(*)\Target memory (KB)
\SQLServer:Resource Pool Stats(*)\Disk Read IO/sec
\SQLServer:Resource Pool Stats(*)\Disk Read IO Throttled/sec
\SQLServer:Resource Pool Stats(*)\Disk Read Bytes/sec
\SQLServer:Resource Pool Stats(*)\Avg Disk Read IO (ms)
\SQLServer:Resource Pool Stats(*)\Disk Write IO/sec
\SQLServer:Resource Pool Stats(*)\Disk Write IO Throttled/sec
\SQLServer:Resource Pool Stats(*)\Disk Write Bytes/sec
\SQLServer:Resource Pool Stats(*)\Avg Disk Write IO (ms)
[db_server]: PS C:> Get-Counter -Counter '\SQLServer:Resource Pool Stats(*)\Disk Read IO/sec'
Get-Counter : The specified instance is not present.
+ CategoryInfo : InvalidResult: (:) [Get-Counter], Exception
+ FullyQualifiedErrorId : CounterApiError,Microsoft.PowerShell.Commands.GetCounterComm
另一方面,不同的计数器起作用
[db_server]: PS C:> Get-Counter -Counter '\SQLServer:Buffer Manager\Lazy writes/sec' -SampleInterval 5
Timestamp CounterSamples
--------- --------------
18.10.2018. 12.22.01 \\db_server\sqlserver:buffer manager\lazy writes/sec :
0
我想念什么?本质上,我想获取此图在Sql Server活动监视器中可用(从同一服务器获取的图像)。
请注意,许多sql server计数器都像上面的一个一样返回0(但不是全部)。有些无法返回0,例如sqlserver:memory manager\total server memory (kb)