W32 CPU (any number of processors) Perl Script via WMI

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

ynot5
Posts: 16
Joined: Mon Jul 24, 2006 3:15 am

win32 graph template cause a php error

Post by ynot5 »

Hi I encountered a script error . can you advise me. I'm using 0.86h
Attachments
Doc1.doc
(123 KiB) Downloaded 688 times
airwalk
Cacti User
Posts: 103
Joined: Fri Aug 18, 2006 11:22 am
Location: MSK, RU

Post by airwalk »

The bad thing in that script (if used against localhost) is that it queries ProcessorLoad which is a load for the previous second. For me it doesn't give meaningful results as the load of CPU while poller is running usually alomost 100 per cent.

Is there any way to monitor load average (for last 5 min), as it's for routers via snmp?
Unsafe
Posts: 1
Joined: Thu Mar 08, 2007 12:43 pm

Post by Unsafe »

This is probably going to sound dumb but how did you get the background colour white on those graphs??
cd
Posts: 14
Joined: Fri Aug 17, 2007 8:41 am

Post by cd »

Sorry for the thread necromancy.

Has anyone gotten this script to work correctly with 8 CPU'S?

Cactid just gives the normal

ERROR: Cactid Timed Out While Processing Hosts Internal

But if I have it poll for 4 cpus it works no problem..
looc
Cacti User
Posts: 110
Joined: Mon Aug 13, 2007 3:40 am

Post by looc »

how can config wmi?
my server: cacti for windows2003
my client:windows2003
Cacti Version - 0.8.7 & spine
Plugin Architecture - 1.3
Server Info - Windows 2003 EP
Web Server -IIS6.0
PHP - 5.2.3
MySQL - 4.1.10
RRDTool - 1.2.15
SNMP - 5.4.1
--------------------------
plugins:
reportit 0.5.1|monitor 0.8.1|thold 0.3.8
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Read the FAQ in my installation guide (in signature).
GiJoe
Posts: 1
Joined: Sun Dec 09, 2007 12:57 pm

Post by GiJoe »

Could you post for 8 CPU server? :D

Thank you.
cafedelmar
Posts: 11
Joined: Mon Dec 24, 2007 3:39 am
Location: Taiwan,Taipei

Post by cafedelmar »

i got no value and the log shows:

12/25/2007 09:25:36 AM - CMDPHP: Poller[0] Host[20] DS[162] CMD: perl K:/web/default/www/cacti/scripts/w32_query_cpu.pl 192.168.0.70 get LoadPercentage 4, output: U :cry:

i run perl <path_cacti>/scripts/w32_query_cpu.pl <hostname> get LoadPercentage 2

and it shows "unable to talk to WMI for .."

so how to talk to WMI...

system:windows 2003
cacti ver:0.8.7a
get cpu information from windows 2000

thanx

:P
Attachments
no value
no value
graph_image.jpg (33 KiB) Viewed 8352 times
khufure
Cacti User
Posts: 203
Joined: Wed Oct 24, 2007 5:47 pm
Location: San Francisco, CA
Contact:

Post by khufure »

jengstro wrote:Any tips on how to deal with 8 hyperthreaded procs? Each physical processor shows up as two seperate procs as far as the template is concerned. Any help is greatly apprieciated.
Turn off hyperthreading? Most of the time it is a performance degredation.
tbaror
Cacti User
Posts: 75
Joined: Mon Jun 05, 2006 6:54 am

Total Cpu load

Post by tbaror »

Hello,

i am trying to create total of total 4 cpu sources load.
tried to create CDEF like

Code: Select all

a,+,b,+,c,+,d,*,100,/,4
but i cant get any results
since i am newbie in graph can someone please advice
thanks
User avatar
Braeburn
Posts: 3
Joined: Tue Aug 07, 2007 4:59 am

Post by Braeburn »

Hello,

Actually, when I try to collect the CPU Load from a Windows 2000 Terminal Server using w32_query_cpu.pl I get empty values.

The command

w32_query_cpu.pl hostname get LoadPercentage 4

gives only

CPU0: CPU1: CPU2: CPU3:

The same command on the localhost gives:

CPU0:2 CPU1:0 CPU2:0 CPU3:24

Are there any special settings which should be set on the Windows 2000 Terminal server?

Thanks in advance for any advice.

Cheers,

B.
chimpooooo
Cacti User
Posts: 50
Joined: Sun Mar 09, 2008 3:57 pm

Post by chimpooooo »

Can someone help me with your script. I am trying to monitor 2 cpu's on a win 2003 server but the graph is empty and i am getting "WARNING: Result from CMD not valid. Partial Result: " :-?
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests