File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff 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+ ?>
You can’t perform that action at this time.
0 commit comments