403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.217.142
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib64/nagios/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/nagios/plugins/check_netstat
#!/usr/bin/perl

print "NETSTAT OK | ";

$A = `netstat -s`;
$A =~ /udpInDatagrams\s*=\s*(\d+)/ and $udpInDatagrams = $1;
$A =~ /udpOutDatagrams\s*=\s*(\d+)/ and $udpOutDatagrams = $1;
$A =~ /udpInErrors\s*=\s*(\d+)/ and $udpInErrors = $1;
$A =~ /tcpActiveOpens\s*=\s*(\d+)/ and $tcpActiveOpens = $1;
$A =~ /tcpPassiveOpens\s*=\s*(\d+)/ and $tcpPassiveOpens = $1;
$A =~ /tcpAttemptFails\s*=\s*(\d+)/ and $tcpAttemptFails = $1;
$A =~ /tcpEstabResets\s*=\s*(\d+)/ and $tcpEstabResets = $1;
$A =~ /tcpCurrEstab\s*=\s*(\d+)/ and $tcpCurrEstab = $1;
$A =~ /tcpOutDataBytes\s*=\s*(\d+)/ and $tcpOutDataBytes = $1;
$A =~ /tcpInInorderBytes\s*=\s*(\d+)/ and $tcpInInorderBytes = $1;
$A =~ /tcpInUnorderBytes\s*=\s*(\d+)/ and $tcpInUnorderBytes = $1;
$A =~ /tcpRetransBytes\s*=\s*(\d+)/ and $tcpRetransBytes = $1;

#$A =~ /abc\s*=\s*(\d+)/ and $abc = $1;

print "udpInDatagrams=$udpInDatagrams, udpOutDatagrams=$udpOutDatagrams, udpInErrors=$udpInErrors, tcpActiveOpens=$tcpActiveOpens, tcpPassiveOpens=$tcpPassiveOpens, tcpAttemptFails=$tcpAttemptFails, tcpEstabResets=$tcpEstabResets, tcpCurrEstab=$tcpCurrEstab, tcpOutDataBytes=$tcpOutDataBytes, tcpInDataBytes=";
print $tcpInInorderBytes + $tcpInUnorderBytes . ", tcpRetransBytes=$tcpRetransBytes\n";

exit 0;

Youez - 2016 - github.com/yon3zu
LinuXploit