Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
543 B

  1. ' Get the performance counter instance for the Windows Management process
  2. set refresher = CreateObject("WbemScripting.SWbemRefresher")
  3. set services = GetObject ("winmgmts://alanbos5/root/cimv2")
  4. if err then WScript.Echo Err.Description
  5. set refreshableItem = refresher.AddEnum (services, "win32_perfrawdata_perfproc_process")
  6. for i = 1 to 100000
  7. WScript.Echo "***********************************"
  8. refresher.Refresh
  9. for each process in refreshableItem.ObjectSet
  10. Wscript.Echo process.Name, process.HandleCount
  11. next
  12. next