You will find it in the statistics section both on the portal and on forum index:
Server uptime 98 days, 15 hours, 38 minutes and 32 seconds
Average load 0.07 • 0.03 • 0.01
I will show you how to add it on index
Open index.php
Find:
Code: Select all
$total_users = $config['num_users'];
Code: Select all
$uptimeindex = shell_exec("cut -d. -f1 /proc/uptime");
$daysindex = floor($uptimeindex/60/60/24);
$hoursindex = $uptimeindex/60/60%24;
$minsindex = $uptimeindex/60%60;
$secsindex = $uptimeindex%60;
$load = sys_getloadavg();
Code: Select all
'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),
Code: Select all
'UPTIME_DAYS' => $daysindex,
'UPTIME_HOURS' => $hoursindex,
'UPTIME_MINS' => $minsindex,
'UPTIME_SECS' => $secsindex,
'AVG_LOAD0' => $load[0],
'AVG_LOAD1' => $load[1],
'AVG_LOAD2' => $load[2],
Open styles/prosilver/template/index_body.html
Find:
Code: Select all
<p>{TOTAL_POSTS} • {TOTAL_TOPICS} • {TOTAL_USERS} • {NEWEST_USER}
Code: Select all
<br />
{L_SERVER_UPTIME}: <strong>{UPTIME_DAYS}</strong> days, <strong>{UPTIME_HOURS}</strong> hours, <strong>{UPTIME_MINS}</strong> minutes and <strong>{UPTIME_SECS}</strong> seconds<br />
{L_AVERAGE_LOAD}: <strong>{AVG_LOAD0}</strong> • <strong>{AVG_LOAD1}</strong> • <strong>{AVG_LOAD2}</strong>
Find:
Code: Select all
?>
Code: Select all
// Server Uptime
$lang = array_merge($lang, array(
'SERVER_UPTIME' => 'Server uptime',
'AVERAGE_LOAD' => 'Average load',
));