<?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;
?>