January 3, 2006 at 4:49 am
Hi All,
Is there anyway to find out the total CPU Utilization of the server through any command (SQL Server command / OS Command) ?
I have tried xp_cmdshell 'tasklist /V', but it gives only cpu time...
Please help
thanks in advance
subban
January 3, 2006 at 8:04 am
You can store perfmon output to a file and look at that.
What are you trying to accomplish?
January 3, 2006 at 8:15 pm
Ok, I need to get total cpu utilisation of the server each hour. I was calling WMI classess through T-SQL for this purpose. But in windows 2003 WMI access is denied by default.
I am looking for an alternate approach... can u help me in this ?
subban
January 4, 2006 at 8:17 am
WMI is probably the best way. If you cannot get access, can you setup PerfMon to get this information and log it?
January 4, 2006 at 10:29 am
If you machine is only used for SQL Server you might consider looking at the @@CPU_BUSY variable. This variable contains the number of milliseconds of CPU used by SQL Server since it started. By comparing the amount from one hour to the next you should be able to get a rough idea of the average CPU utilization.
Gregory A. Larsen, MVP
January 4, 2006 at 4:37 pm
Hi,
I would opt for WMI. Go to Microsoft website. Download Scriptomatic tool (search by the keyword "scriptomatic"). Install it. Installing consists just of unzipping the tool and the readme. Double-click on the tool Scriptomatic.hta. In the open window select your counter in the dropdown. You may want to select WIN32_PerfRowData_PerfOS_Processor
Once you select, the script is written for you in the window! You can save it, modify it, run it, save as VBS file and run in a batch, add input/output. You will like it.
Regards,Yelena Varsha
January 5, 2006 at 2:27 am
OK.... thanks to all.
What about scheduling system monitor and get the output to a csv file. Tne read from that csv file..Any issues, if it is a production box ?
subban
January 5, 2006 at 3:35 am
Performance Monitor can log directly to SQL server so you may as well make use of this and read the data directly from the table created.
January 6, 2006 at 4:04 am
THANKS TO ALL.....good info
subban
January 6, 2006 at 7:40 pm
We use Nagios to monitor our systems. With nagiostat/rrdtool you can make historical charting of performance. We have charts of our AS400 performance, Windows AD, SQL Server, Cisco devices, temp in server rooms, etc. Anything that can be logged in Windows performance monitor/SNMP is available to the nagios windows client for collection/alerts/metrics. As we grew in the company it got too ridiculous to look at perf monitor, vmstat, iseries navigator, OEM, etc. in each machine so we went to a central collection system that looks at everything.
It probably sounds elaborate - but it wasn't that difficult to do and the advantages are enormous.
August 12, 2008 at 3:48 am
Hi all....
The above methods wats mentioned are good in finding out the CPU utilization.Can anyone advice me how i can monitor all the processes consuming CPU usage continuously (by the use of some job scheduled to execute a procedure which determines the CPU usage)and can keep some threshold like 70% and if CPU usage crosses that threshold I should be able to get an alert.
Thanks in Advance...
Vinay
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply