Project

General

Profile

« Previous | Next » 

Revision dfe2769c

Added by Renato Botelho over 12 years ago

Use exec directly instead of exec_command

View differences:

usr/local/www/includes/functions.inc.php
183 183
}
184 184

  
185 185
function swap_usage() {
186
	$swap_info = exec_command("/usr/sbin/swapinfo");
186
	exec("/usr/sbin/swapinfo", $swap_info);
187 187
	$swap_used = "";
188
	foreach (explode("\n", $swap_info) as $line)
188
	foreach ($swap_info as $line)
189 189
		if (preg_match('/(\d+)%$/', $line, $matches)) {
190 190
			$swap_used = $matches[1];
191 191
			break;

Also available in: Unified diff