Files
votianng/html/sysadmin/monitor_capacity_called.php
2026-03-29 10:34:57 +02:00

27 lines
684 B
PHP

<?php
/*=======================================================================
*
* monitor_capacity_called.php
*
* Autor: Marc Vollmann
*
* Checks the used volume space on the current server
*
=======================================================================*/
include_once ("../include/mcglobal.inc.php");
// getSecHttpVars("1",array("mountedVolume", "volumeSpace"));
if (!isset($mountedVolume) || $mountedVolume == "") : $mountedVolume = "srv"; endif;
$volumeSpace = "";
$out = shell_exec("df -h");
$tmpPos = strpos($out, "/" . $mountedVolume);
if (!($tmpPos === false)) :
$volumeSpace = substr($out, $tmpPos - 4, 2);
else :
$volumeSpace = "--%";
endif;
?>