403Webshell
Server IP : 198.38.94.67  /  Your IP : 216.73.217.142
Web Server : LiteSpeed
System : Linux d6054.dxb1.stableserver.net 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
User : azfilmst ( 1070)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/thread-self/root/lib64/nagios/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/root/lib64/nagios/plugins//check_a2_jbk_client_limits.sh
#!/bin/bash
_zfs_clients=$(df -hm | grep "backups/" | grep -E "az|mi|nl|sg" -c)
_zfs_clients_gt3t=$(df -hm | grep "backups/"| awk '$3 > 3000000' | wc -l)
_zfs_clients_lt3t=$(df -hm | grep "backups/"| awk '$3 < 3000000' | wc -l)

if [[ "${_zfs_clients}" -gt 35 ]]; then
  if [[ "${_zfs_clients_gt3t}" -gt 5 ]] && [[ "${_zfs_clients_gt3t}" -lt 10 ]]; then
    echo -e "This server has ${_zfs_clients} clients, out of that ${_zfs_clients_gt3t} are > 3TBs and ${_zfs_clients_lt3t} are < 3TBs. Please consider migrating a couple of clients."
    exit 1
  elif [[ "${_zfs_clients_gt3t}" -gt 10 ]]; then
    echo -e "This server already has ${_zfs_clients_gt3t} large clients. Out of total ${_zfs_clients}, ${_zfs_clients_gt3t} are > 3TBs and ${_zfs_clients_lt3t} are < 3TBs, please consider migrating a couple of large clients for better storage balance."
    exit 1
  elif [[ "${_zfs_clients}" -gt 32 ]]; then
    echo -e "This server has ${_zfs_clients} clients, out of that ${_zfs_clients_gt3t} are > 3TBs and ${_zfs_clients_lt3t} are < 3TBs. Please consider migrating a couple of clients."
    exit 1
  fi
else
  echo "client total is healthy"
  exit 0
fi

Youez - 2016 - github.com/yon3zu
LinuXploit