Windows 2000/2003 Perfmon Graphs

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Windows 2000/2003 Perfmon Graphs

Post by jengstro »

Hello all,

Any idea where or how I might graph some of the values you can gather with PerfMon? Such as...

"\\\System\\Processor Queue Length"
"\\\\PhysicalDisk(_Total)\\Current Disk Queue Length"

"\\\\SQLServer:General Statistics\\User Connections"
"\\\\SQLServer:Locks(_Total)\\Lock Timeouts/sec"
"\\\\SQLServer:Locks(_Total)\\Lock Wait Time (ms)"

I'm sure there is an easy answer but I am having the toughest time finding it..

Thanks.
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) Buy SNMP Informant Advanced version
2) Have the perfmon store the data to a log file. Use a script to parse the log and feed it to cacti. I recall someone has done that before... search around.
3) Some of that data might be available via WMI too. Yet another script that might need to be written.
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

I am suprised that this is not a common request to be honest. Perhaps because Cacti tends to seem more focused on the Linux graphs?
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Yea, linux plays a strong part. Also, it's not a 'clean' solution to monitoring the performance counters in windows via a log file and then parsing it. WMI would be better, but there is a big performance hit there too.
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

WMI eh? I looked for WMI scripts/templates that would provide the graphs. The only one I found provided a graphing solution from Linux to Windows but not Windows to Windows.
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Did you try the MS script repository? http://www.microsoft.com/technet/script ... fault.mspx
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

To be honest... I looked though that site a few times but I am havig a tough time making the connection. :(
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Something like this: http://www.microsoft.com/technet/script ... ovb03.mspx

You would need to use the correct WMI performance counter to monitor the counters you specified above. Read around on the Microsoft scripting site for howtos and tools. You'll probably want to get the WMI Object Browser
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

Ok. Thanks for the link and help.

I like the data that the following vb script provides...

Code: Select all

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
set objRefresher = CreateObject("WbemScripting.SWbemRefresher")
Set colItems = objRefresher.AddEnum _
    (objWMIService, "Win32_PerfFormattedData_PerfOS_System").objectSet
objRefresher.Refresh

For i = 1 to 5
    For Each objItem in colItems
        Wscript.Echo "Alignment Fixups Per Second: " & _
            objItem.AlignmentFixupsPersec
        Wscript.Echo "Caption: " & objItem.Caption
        Wscript.Echo "Context Switches Per Second: " & _
            objItem.ContextSwitchesPersec
        Wscript.Echo "Description: " & objItem.Description
        Wscript.Echo "Exception Dispatches Per Second: " & _
            objItem.ExceptionDispatchesPersec
        Wscript.Echo "File Control Bytes Per Second: " & _
            objItem.FileControlBytesPersec
        Wscript.Echo "File Control Operations Per Second: " & _
            objItem.FileControlOperationsPersec
        Wscript.Echo "File Data Operations Per Second: " & _
            objItem.FileDataOperationsPersec
        Wscript.Echo "File Read Bytes Per Second: " & _
            objItem.FileReadBytesPersec
        Wscript.Echo "File Read Operations Per Second: " & _
            objItem.FileReadOperationsPersec
        Wscript.Echo "File Write Bytes Per Second: " & _
            objItem.FileWriteBytesPersec
        Wscript.Echo "File Write Operations Per Second: " & _
            objItem.FileWriteOperationsPersec
        Wscript.Echo "Floating Emulations Per Second: " & _
            objItem.FloatingEmulationsPersec
        Wscript.Echo "Name: " & objItem.Name
        Wscript.Echo "Percent Registry Quota In Use: " & _
            objItem.PercentRegistryQuotaInUse
        Wscript.Echo "Processes: " & objItem.Processes
        Wscript.Echo "Processor Queue Length: " & _
            objItem.ProcessorQueueLength
        Wscript.Echo "System Calls Per Second: " & _
            objItem.SystemCallsPersec
        Wscript.Echo "System UpTime: " & objItem.SystemUpTime
        Wscript.Echo "Threads: " & objItem.Threads
        Wscript.Sleep 2000
        objRefresher.Refresh
    Next
Next
Now the next question is how the heck do I modify the script to graph the data with Cacti.
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
User avatar
dust2k
Cacti User
Posts: 101
Joined: Sun Dec 04, 2005 3:14 am

Post by dust2k »

Good on you, you are into steps to be Script/template developer now, haha...

Read Cacti manual to understand XML Template format, and open other Perl/WMI script to find out how to make them together, good luck.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

FYI, you never ever have to edit the template XML. As a matter of fact, the structure isn't documented.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
dust2k
Cacti User
Posts: 101
Joined: Sun Dec 04, 2005 3:14 am

Post by dust2k »

oh, really ? so all template are generated by Cacti as you mentioned ?
jabbasi
Posts: 13
Joined: Thu May 12, 2005 4:39 pm
Location: canada

Windows 2000/2003 Perfmon Graphs

Post by jabbasi »

jengstro wrote:WMI eh? I looked for WMI scripts/templates that would provide the graphs. The only one I found provided a graphing solution from Linux to Windows but not Windows to Windows.
Hi
can you please send me link to this?
I am running cacti on linux, but I want to parse perfmon logs for cati.

thanks
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Being this is a really old thread, I wouldnt expect a reply from him.

To monitor more things than snmp from linux on windows, look into using nsclient.
jabbasi
Posts: 13
Joined: Thu May 12, 2005 4:39 pm
Location: canada

Windows 2000/2003 Perfmon Graphs

Post by jabbasi »

hi

thanks for advice.
I was more inclined to wmi, but, it seems like there not to many scripts and templates available for wmi stuff.

I also tried your way querying snmp for running processes and then monitor cpu and me, but i don't feel good abot the way cacti shows numbers, which are really differen than perfmon.
any suggestions ides are welcome
thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests