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.
In reply to Re: Re: Thread Counts
by meetraz
in thread Thread Counts
by kidwahoo94
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |