V1rus Private
User / IP
:
216.73.217.108
Host / Server
:
190.92.174.125 / aerosofthealthcare.com
System
:
Linux s3739.bom1.stableserver.net 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64
Cmd
|
Upload
|
Mass Deface
|
Create
|
Sym
:
/
lib64
/
nagios
/
plugins
/
Viewing: a2_yum_processes.shared
#!/bin/bash # # SysEng Project: https://jira.a2hosting.com/browse/SYSENG-1853 # Refactored - https://a2hosting.atlassian.net/browse/SYSENG-27232 # yum_procs=( $(ps aux | grep /usr/bin/yum | grep -v grep | awk '{print $2}') ) yum_proc_count=( $(ps aux | grep /usr/bin/yum | grep -vc grep) ) yum_max_age=21600 # 6 hours threshold=1 if [[ ! "$(hostname -f)" =~ (a2hosting.com|supercp.com)$ ]]; then # random sleep to prevent running on all VMs on the same node at the same time sleep $(( ( RANDOM % 120 ) + 1 )) fi if [[ "${yum_proc_count}" -gt "${threshold}" ]]; then for proc in ${yum_procs[@]}; do yum_proc_age=$(ps -p ${proc} -o etimes=) if [[ "${yum_proc_age}" -gt "${yum_max_age}" ]]; then echo "${count} processes running" exit 2 break fi done else echo "YUM processes - OK" exit 0 fi
Coded With 💗 by
HanzOFC