����JFIF��x�x����'
| Server IP : 78.140.185.180 / Your IP : 216.73.216.38 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/self/root/proc/self/root/lib64/nagios/plugins/extra/ |
Upload File : |
#!/bin/bash
/usr/local/mgr5/sbin/mgrctl -m ispmgr db.filter name='' owner=* node=* type=* saved_filters='' sok=ok &>/dev/null
dbs=$(/usr/local/mgr5/sbin/mgrctl -m ispmgr db -o json | jq -r '.doc.elem[] | {owner, size} | .[]. "$"' | \
xargs -n 2 | egrep -v "(fozzy|billing)" | awk '{user[$1] +=$NF} END{ for (i in user) print i, user[i]}' )
exit=0
while read -r user limit used;
do
dbsize=$(echo "$dbs" | egrep "^$user " | awk '{print $2}' )
dbsize=$(/bin/printf "%.0f" $dbsize)
sum=$(( used + dbsize ))
if [[ "$sum" -gt "$limit" ]]; then
echo "$user used $sum of $limit"
exit=1
fi
done < <(/usr/local/mgr5/sbin/mgrctl -m ispmgr user -o json | jq -r '.doc.elem[] | {name, quota_total, quota_used} | .[]. "$"' | \
xargs -n 3 | egrep -v "(fozzy|billing)" )
exit $exit