I guys , i'm trying to check SQLServer:Memory Manager Stolen Server Memory on a 2012 sql server. Any idea ?
Best Answer
The Stolen Server Memory (KB) counter was introduced in SQL Server 2012. (In earlier versions, there was the Stolen pages counter)
The SQL Query below will get you the value you are looking for.
SELECT cntr_value FROM sys.dm_os_performance_counters WHERE [counter_name] = 'Stolen Server Memory (KB)'
Using the Multi Channel SQLspXML sensor, you can select multiple values to report on, like
SELECT counter_name as Channel ,cntr_type as Value ,1 as IsInt ,'KB' as Unit FROM sys.dm_os_performance_counters WHERE [counter_name] = 'Stolen Server Memory (KB)' UNION SELECT counter_name as Channel ,cntr_type as Value ,1 as IsInt ,'KB' as Unit FROM sys.dm_os_performance_counters WHERE [counter_name] = 'SQL Cache Memory (KB)' UNION SELECT counter_name AS Channel ,cntr_type as Value ,1 as IsInt ,'KB' as Unit FROM sys.dm_os_performance_counters WHERE [counter_name] = 'Total Server Memory (KB)'
More info can be found in the sensor's manual.
Created on Jun 13, 2014 9:35:47 AM by
PRTG Tools Family [prtgtoolsfamily.com]
(13,413)
●3
●4
3 Replies
Hello,
thank you very much for KB-Post. Please check if you can get this metric with a SQL-Query, then you can use a normal SQL-Sensor with a SQL-Sensor and the query. Maybe the metric is also available as a Performance Counter or a WMI Class / Object. Then you could look into using a Custom Performance Counter or Custom WMI Sensor.
best regards.
The Stolen Server Memory (KB) counter was introduced in SQL Server 2012. (In earlier versions, there was the Stolen pages counter)
The SQL Query below will get you the value you are looking for.
SELECT cntr_value FROM sys.dm_os_performance_counters WHERE [counter_name] = 'Stolen Server Memory (KB)'
Using the Multi Channel SQLspXML sensor, you can select multiple values to report on, like
SELECT counter_name as Channel ,cntr_type as Value ,1 as IsInt ,'KB' as Unit FROM sys.dm_os_performance_counters WHERE [counter_name] = 'Stolen Server Memory (KB)' UNION SELECT counter_name as Channel ,cntr_type as Value ,1 as IsInt ,'KB' as Unit FROM sys.dm_os_performance_counters WHERE [counter_name] = 'SQL Cache Memory (KB)' UNION SELECT counter_name AS Channel ,cntr_type as Value ,1 as IsInt ,'KB' as Unit FROM sys.dm_os_performance_counters WHERE [counter_name] = 'Total Server Memory (KB)'
More info can be found in the sensor's manual.
Created on Jun 13, 2014 9:35:47 AM by
PRTG Tools Family [prtgtoolsfamily.com]
(13,413)
●3
●4
Ok guys , thanks for the answer. I've find another way to monitor it .. the perfcounter custom sensor. whit that i've managed to check everything i needed Hope can help someone also this solution
Please log in or register to enter your reply.
Add comment