Skip to content

Commit e403c94

Browse files
AntennipasiAntennipasi
authored andcommitted
Changed diskusage-info human readable, added filesystem type..
1 parent 7e35246 commit e403c94

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

server/mods-available/monitor_core_module.inc.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ function monitorDiskUsage() {
192192
$state = 'ok';
193193

194194
/** Fetch the data into a array */
195-
$dfData = shell_exec("df");
195+
$dfData = shell_exec("df -hTx tmpfs");
196196

197197
// split into array
198198
$df = explode("\n", $dfData);
@@ -208,11 +208,12 @@ function monitorDiskUsage() {
208208
*/
209209
$s = preg_split ("/[\s]+/", $df[$i]);
210210
$data[$i]['fs'] = $s[0];
211-
$data[$i]['size'] = $s[1];
212-
$data[$i]['used'] = $s[2];
213-
$data[$i]['available'] = $s[3];
214-
$data[$i]['percent'] = $s[4];
215-
$data[$i]['mounted'] = $s[5];
211+
$data[$i]['type'] = $s[1];
212+
$data[$i]['size'] = $s[2];
213+
$data[$i]['used'] = $s[3];
214+
$data[$i]['available'] = $s[4];
215+
$data[$i]['percent'] = $s[5];
216+
$data[$i]['mounted'] = $s[6];
216217
/*
217218
* calculate the state
218219
*/
@@ -1304,4 +1305,4 @@ function _getIntArray($line){
13041305

13051306
} // end class
13061307

1307-
?>
1308+
?>

0 commit comments

Comments
 (0)