question

Miiimy7-1570 avatar image
0 Votes"
Miiimy7-1570 asked Criszhan-msft commented

Cpu information using DMVs SQL Server

Hello guys!

i want to retrieve information about CPU (%processor time, ...) by using DMVs. I already know about sys.dm_os_ring_buffers but the interval during which informations are collected is pretty long (1 min) . Anything can happen in one minute!

If you have some tips, it would be cool!

Thank you very much

sql-server-generalsql-server-transact-sql
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OlafHelper-2800 avatar image
1 Vote"
OlafHelper-2800 answered ErlandSommarskog commented

SQL Server is a server to manage data, not to monitor OS or hardware.

Implement a monitor by installing a monitoring software, e.g. Windows PerfMon or some open source software like Nagios.

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

hello,

yes but i just want the information about SQL Server. The CPU utilization used by the process in SQL Server.

0 Votes 0 ·

That information is better monitored outside of SQL Server. Any perfmon monitoring will expose that information.

SQL Server is rarely CPU dependent. Are you having an actual problem, or just looking for hardware monitoring?

0 Votes 0 ·

No i don't have any problem, i just want another monitoring solution instead of perfmon. I'm staying inside SQL Server concept. I want to retrieve all information about SQL Server within SQL Server only. And for that i'm playing with DMVs. But there are so many. And i'm asking here to get some tips.
thank you

0 Votes 0 ·
Show more comments
ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered Miiimy7-1570 commented

Have a lot at the system function @@CPU_BUSY. This is a very ancient one, and you will have to read up a little on it to make sense out of it.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Criszhan-msft avatar image
0 Votes"
Criszhan-msft answered Criszhan-msft commented

Hi,

If you need to monitor the resource usage of SQL Server in real time, it is more convenient to use tools from outside of SQL Server.

Using the performance dashboard (reports) in SSMS, and the DMVs of SQL Server itself, you can better understand the performance of SQL Server over a period of time.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes thank you but is there any possibilities that we can retrieve
data from Activity monitor in SSMS?

0 Votes 0 ·

Yes thank you but is there any possibilities that we can retrieve

data from Activity monitor in SSMS?

By running queries? Sure. Activity Monitor is running queries for you, but you can use Profiler to find out what it is emitting.
0 Votes 0 ·

Activity Monitor runs queries on the monitored instance to obtain information for the Activity Monitor display panes. When the refresh interval is set to less than 10 seconds, the time that is used to run these queries can affect server performance


0 Votes 0 ·