ROOTPLOIT
Server: Apache
System: Linux node6122.myfcloud.com 6.14.3-x86_64-linode168 #1 SMP PREEMPT_DYNAMIC Mon Apr 21 19:47:55 EDT 2025 x86_64
User: bashacomputer (1004)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib64/nagios/plugins/vz7_check_a2_zombie-procs.sh
#!/bin/bash

# Get the number of zombie processes
zombie_procs=$(ps -eo stat |grep -c '^Z')

# Check if the number of zombie processes exceeds the threshold if so run script and crit
if [[ "${zombie_procs}" -gt 250 ]]; then
  if [ ! -f "/etc/cron.d/zombie_check" ]; then
    /opt/bin/zombie_procs.sh
    echo "Zombie_Processes - ${zombie_procs} zombie processes detected - CRIT"
    exit 2
  else
    echo "Zombie_Processes - ${zombie_procs} zombie processes detected - CRIT"
    exit 2
  fi
else
  if [ -f "/etc/cron.d/zombie_check" ]; then
    rm -f /etc/cron.d/zombie_check
    echo "Zombie_Processes - ${zombie_procs} zombie processes detected - OK"
    exit 0
  else
    echo "Zombie_Processes - ${zombie_procs} zombie processes detected - OK"
    exit 0
  fi
fi