Windows Memory

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

Moderators: Moderators, Developers

Author
Message
Lit
Posts: 14
Joined: Thu Aug 26, 2004 4:19 pm
Location: Ireland

Windows Memory

#1 Post by Lit » Fri Sep 03, 2004 7:56 pm

Windows Memory Via Wmi
Attachments
Screen001.jpg
Screen001.jpg (77.92 KiB) Viewed 73531 times
cacti_graph_template_lit_w32_os.xml
(30.45 KiB) Downloaded 9904 times
cacti_data_template_lit_w32_os.xml
(9.59 KiB) Downloaded 12210 times

Lit
Posts: 14
Joined: Thu Aug 26, 2004 4:19 pm
Location: Ireland

Perl Script

#2 Post by Lit » Fri Sep 03, 2004 8:00 pm

Script
Attachments
ScreenHunter_004.jpg
ScreenHunter_004.jpg (103.99 KiB) Viewed 73531 times
Lit_W32_OS.pl.txt
(5.6 KiB) Downloaded 7132 times

helpme

um linux?

#3 Post by helpme » Fri Sep 17, 2004 2:37 pm

how do i make this script work on linux?

guerra6880
Posts: 33
Joined: Mon Apr 19, 2004 7:47 am
Contact:

Re: Windows Memory

#4 Post by guerra6880 » Wed Sep 22, 2004 4:12 am

Lit wrote:Windows Memory Via Wmi
I have you experienced any problems with this script running against a W2K3 server? I have no problems against a W2k box but I am getting a partial results error from a W2k3 server causing now data to be collected. Just wondering if you were seeing the same.

Thanks,
Dave

DevilSun
Cacti User
Posts: 166
Joined: Fri Jul 16, 2004 1:59 pm
Location: Oregon

#5 Post by DevilSun » Wed Sep 22, 2004 10:43 am

Yah, I'm querying the same stuff on my Win2003 boxen and it works fine although I might have wrote my own script but it's the same WMI class and fields.

guerra6880
Posts: 33
Joined: Mon Apr 19, 2004 7:47 am
Contact:

#6 Post by guerra6880 » Wed Sep 22, 2004 11:52 pm

DevilSun wrote:Yah, I'm querying the same stuff on my Win2003 boxen and it works fine although I might have wrote my own script but it's the same WMI class and fields.
Devil,

Would you mind either posting or e-mailing me your scripts/ templates if possible?

scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

return no value

#7 Post by scavenger67 » Wed Jul 06, 2005 5:24 am

Hi all,

the scripts works fine outside cacti. he returns value.
but in cacti, i graph nothing.
the configuration seems to be correct.
any idea ?

Thomas
Cacti User
Posts: 112
Joined: Thu Dec 09, 2004 1:51 pm
Location: Austria

Re: um linux?

#8 Post by Thomas » Wed Jul 06, 2005 10:00 am

helpme wrote:how do i make this script work on linux?
You can't run WMI scripts on Linux. You have to use some "tools" as described in http://forums.cacti.net/viewtopic.php?t=5842.

HTH
Thomas Rupp

scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

strange..

#9 Post by scavenger67 » Fri Jul 08, 2005 5:36 am

Could someone help me..
executing the scriopt manually works perfectly, i have all the data i need but cacti graph nothing...

help
please
Attachments
memory.jpg
memory.jpg (42.01 KiB) Viewed 72336 times

Thomas
Cacti User
Posts: 112
Joined: Thu Dec 09, 2004 1:51 pm
Location: Austria

#10 Post by Thomas » Fri Jul 08, 2005 6:41 am

In the CACTI Manual you can find a chapter "Simplest Method of Going from Script to Graph (Walkthrough)".
This should give you a good starting point.
Thomas Rupp

scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

wmi problem

#11 Post by scavenger67 » Wed Jul 13, 2005 2:01 am

Have check on cacti log :

WARNING: Result from CMD not valid. Partial Result: Unable to talk to WM
07/13/2005 08:35:22 AM - CMDPHP: Poller[0] Host[9] CMD: c:/perl/bin/perl.exe c:/apache2/htdocs/cacti/scripts/w32_query_OperatingSystem.pl yxxxx get TotalVisibleMemorySize,FreePhysicalMemory,TotalVirtualMemorySize,FreeVirtualMemory, output: U

seems that there is a problem with WMI.. any idea ?
thanks

scavenger67
Posts: 49
Joined: Fri Mar 18, 2005 7:33 am
Location: France

is it working.?

#12 Post by scavenger67 » Fri Jul 15, 2005 1:23 pm

is the scripts working on 0.8.6.c.
don't find any anwser about this problem.
command line works perfectly but not throught cacti.

as i understand output:U mean that the script didin't return any value but WHY ?
must i install something on the pc running cacti for a WMI query ?
"Unable to talk to WM" ??!? what is that ?

any help will be welcome. :wink:

ioiioi
Cacti User
Posts: 52
Joined: Mon Mar 28, 2005 8:57 am

#13 Post by ioiioi » Tue Sep 13, 2005 11:22 am

The version in which Lit developed this script is different from the 0.8.6f or even ealier version. The directory has been changed from /resource/script-quriers/lit_w32_os.pl to /scripts/lit_w32_os.pl. So I imported the template and modified the Data input method and export it to this new one, you can have a try. :D
Attachments
cacti_data_template_lit_w32_os.zip
(7.29 KiB) Downloaded 3552 times

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

#14 Post by jengstro » Wed Nov 23, 2005 1:14 pm

I can get data back from the localhost but not remote hosts...

Here is what the log says:

Code: Select all

WARNING: Result from CMD not valid. Partial Result: Unable to talk to WM
Any ideas?
[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: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#15 Post by BSOD2600 » Wed Nov 23, 2005 1:36 pm

You need to adjust WMI security. Take a read here and here.

Post Reply