Hello all, first poster here.
I have attempted to use wmi in order to graph the cpu speed as a quick and
dirty way to pull windows cpu information easily.
I adapted the disk WMIv2 perl script to do so.
Here is the code:
> #!/usr/bin/perl
> # Author : Eric Julson
> # Date : 11/02/2007
> # check_wmic_cpu.pl HOST USER PASSWORD
>
> if ( @ARGV[0] eq "" || @ARGV[1] eq "" || @ARGV[2] eq "" ) {
> print "check_wmic_cpu.pl HOST USER PASSWORD\n";
> exit 0;
> }
>
> $results =`\$ZENHOME/bin/wmic -U '@ARGV[1]'%'@ARGV[2]' //@ARGV[0] "SELECT
> CurrentClockSpeed FROM Win32_Processor"|grep CPU0|sed -e 's/|CPU0//g'`;
>
>
> if ( $results ) {
> @results = split (/\n/,$results);
> $line = @results;
>
> print "OK|CurrentClockSpeed=$results";
> } else {
> print "Unknown|No_response\n";
When I test this on the command prompt, the output seems correct:
> OK|CurrentClockSpeed=2160
>
Yet when I use the output in a graph exactly like the one for wmi_disk, it
returns a null value.
Did anyone found a way to do display windows cpu information properly without
dell or hp zen pack on its own?
Thank you very much in advance for any help.
-------------------- m2f --------------------
Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=15735#15735
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users