Skip to content

Instantly share code, notes, and snippets.

@deekayen
Created November 27, 2014 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deekayen/6cde169a5defbbc8f7d8 to your computer and use it in GitHub Desktop.
Save deekayen/6cde169a5defbbc8f7d8 to your computer and use it in GitHub Desktop.
Count the number of running svchost.exe processes on a Windows server using PHP
<?php
$wmic = `wmic process get description`;
$total_svchost_running = substr_count($wmic, 'svchost.exe');
echo 'Total svchost.exe processes: ' . $total_svchost_running;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment