in reply to Re: Thread Counts
in thread Thread Counts
use strict; use Win32::OLE; my $WMI = Win32::OLE->GetObject("winmgmts:"); my $Procs = $WMI->InstancesOf("Win32_Process"); foreach my $Proc (in $Procs) { printf( "PID %u has %u threads.\n", $Proc->ProcessId, $Proc->ThreadCount, ); }
Very quick & easy. The Win32_Process class has other valuable properties too. See the class documentation @ MSDN for more info.
|
|---|