Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Tips Database Forum Rss Feed

» Database Journal Home
» Database Articles
» Database Tutorials
MS Access
SQL Scripts & Samples
» Database Forum
» Slideshows
Free Newsletters:

News Via RSS Feed

Rss Feed

Database Journal |DBA Support |SQLCourse |SQLCourse2

Featured Database Articles


Posted May 17, 2005

Monitor SQL Server CPU Loads - Page 2

By Muthusamy Anantha Kumar aka The MAK

Step 8

Execute C:\RRD\CreateDB.bat. [Refer Fig 1.2]

This creates an .rrd file for every processor for the servers listed in server.txt.

Step 9

Create a Schedule to run the batch file C:\RRD\monitor.bat every 5 minutes as shown below. Refer Fig 1.3 and 1.4

Fig 1.4

This schedule runs every minute and updates the .rrd database file for all of the servers listed in server.txt

Step 10

Collect information for the whole day and execute the command below to generate a graph. Refer Fig 1.5

CSCRIPT Show_Graph.vbs "ATDBQA" "0" "2005-04-27 10:00 am" "2005-04-27 3:00 pm"

Fig 1.5

Start ATDBQA_CPU0.png

Step 11

Execute the command below to see the graph Refer 1.6. It opens the PNG file with the associated default application. Refer Fig 1.7

Fig 1.6

Fig 1.7

Step 12

If you want to create one graph with all of the processor loads on it, then execute the show_graph2.vbs as shown below. Refer fig 1.8

Note: show_graph2.vbs can produce a graph for 16 processors. If the number of processor exceeds 16, it will fail to create the graph.

CSCRIPT Show_Graph.vbs "ATDBQA" "2005-04-27 6:00 am" "2005-04-28 9:00 pm"

Fig 1.8

Step 13

Execute the command below to see the graph. Refer 1.9. It opens the PNG file with the associated default application. Refer Fig 2.0

Fig 1.9

Fig 2.0


As mentioned before, this article illustrates how to monitor the CPU load on multiple SQL Server machines. It also illustrates on how to collect data in Round Robin database to produce a graph. This helps in determining the heavily used and under utilized servers. The illustrations of this article can be applied on any windows machine with WMI.

RRDTool, developed by Tobias Oetiker, is available under GNU General Public License.

» See All Articles by Columnist MAK

MS SQL Archives

Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL 2005: SSIS: Error using SQL Server credentials poverty 3 August 17th, 07:43 AM
Need help changing table contents nkawtg 1 August 17th, 03:02 AM
SQL Server Memory confifuration bhosalenarayan 2 August 14th, 05:33 AM
SQL Server Primary Key and a Unique Key katty.jonh 2 July 25th, 10:36 AM