Advertisement
playfulgod

skyn3t stuff

Feb 7th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. <?php
  2.  
  3. function ps_ax($str) {
  4.     if (empty($str)) return FALSE;
  5.     return (bool) `ps ax | grep -v grep | grep $str`;
  6. }
  7.  
  8. $processes = array('httpd','mysqld','sshd','qmail','pop3','named');
  9. foreach ($processes as $process) {
  10.     echo $process . ((ps_ax($process)) ? ': RUNNING<br>' : ': STOPPED<br>');
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement