Solution:
use Win32::OLE;
$instances = Win32::OLE->GetObject("winmgmts:\\\\localhost\\root\\CIMV2")->InstancesOf(Win32_LogicalDisk) or die "Cant access WMI";
for my $proc (in $instances)
{
printf "%5d %7d \n", $proc->{ProcessId}, $proc->{WorkingSetSize};
}
More examples on: http://www.perlmonks.org
No comments:
Post a Comment