1. Import
This commit is contained in:
27
html/sysadmin/monitor_capacity_called.php
Normal file
27
html/sysadmin/monitor_capacity_called.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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;
|
||||
?>
|
||||
Reference in New Issue
Block a user