<?php
include('../includes/common.inc.php');
checkReferrer() or die();

$data = shell_exec("free -m | awk 'NR==2{printf \"%s/%sMB %.2f%\", \$3,\$2,\$3*100/\$2 }'");
$s = explode(' ', $data);
echo json_encode(array(
	'mb' => $s[0],
	'pc' => $s[1]
));
?>