����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 3.15.31.240 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 : /usr/lib64/nagios/plugins/base/ |
Upload File : |
#!/usr/bin/env perl use extreme; my $exit_status = 0; my ($user,$limit,$used); my $isp5 = 1 if -d '/usr/local/mgr5'; my @users_data = $isp5 ? `sudo /usr/local/mgr5/sbin/mgrctl -m ispmgr user | grep -v "active=off"` : `sudo /usr/local/ispmgr/sbin/mgrctl -m ispmgr user | grep -v disabled`; chomp @users_data; for my $line (@users_data) { ($user,$limit,$used) = $line =~ / name=([^\s]*) .* traff_total=([^\s]*) .* traff_used=([^\s]*) /x if $isp5; ($user,$used,$limit) = $line =~ / name=([^\s]*) .* bandwidth=([^\/]*)\/([^\s]*) /x if !$isp5; if ($used > $limit) { my $overhead = ($used-$limit)/1024; printf("$user used over limit: %.02f GB\tlimit: %.02f GB\n", $overhead, $limit/1024); $exit_status=2; } } exit $exit_status;