File: testwbem.pl

package info (click to toggle)
cricket 1.0.5-9
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,480 kB
  • ctags: 390
  • sloc: perl: 8,287; sh: 920; ansic: 318; makefile: 62; sql: 16
file content (20 lines) | stat: -rwxr-xr-x 770 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

use lib "../lib";
use strict;
use Common::Log;
use wbem;

Common::Log::setLevel('debug');

# For 0,1, & 4 the consecutive colons (::) indicate poll the localhost
# 2 & 3 poll a remote host, substitute an appropriate hostname for <remote>
my @temp = (
	'0::Root/CIMV2:WIN32_PerfRawData_PerfDisk_PhysicalDisk:DiskReadsPersec:Name=\'_Total\'',
	'1::Root/CIMV2:CIM_Processor:LoadPercentage:DeviceID=\'CPU0\'',
	'2:<remote>:Root/CIMV2:WIN32_PerfRawData_PerfDisk_PhysicalDisk:DiskReadsPersec:Name=\'_Total\'',
        '3:<remote>:Root/CIMV2:CIM_Processor:LoadPercentage:DeviceID=\'CPU0\'',
        '4::Root/CIMV2:WIN32_PerfRawData_PerfDisk_PhysicalDisk:DiskWritesPersec:Name=\'_Total\'');

my @results = &{$main::gDSFetch{'wbem'}}(\@temp);

print join("\n",@results) . "\n";