Currently the system info page only shows
CPU model
CPU MHz
CPU cache
CPU bogomips
This howto will show how to add "Number of CPU cores" to that list.
This is only a quick edit of 2 files
Edit:
/var/www/ispcp/gui/admin/system_info.php
locate
Code:
if (!isset($cpu['cpuspeed'])) {
$cpu['cpuspeed'] = "n.a.";
}
add
Code:
if (!isset($cpu['cpus'])) {
$cpu['cpus'] = "n.a.";
}
locate
Code:
'TR_CPU_MHZ' => tr('CPU MHz'),
'TR_CPU_CACHE' => tr('CPU cache'),
'TR_CPU_BOGOMIPS' => tr('CPU bogomips'),
add
Code:
'TR_CPU_COUNT' => tr('Number of CPU Cores'),
Locate
Code:
'CPU_MODEL' => $cpu['model'],
'CPU_MHZ' => $cpu['cpuspeed'],
'CPU_CACHE' => $cpu['cache'],
'CPU_BOGOMIPS' => $cpu['bogomips'],
add
Code:
'CPU_COUNT' => $cpu['cpus'],
Edit:
/var/www/ispcp/gui/themes/omega_original/system_info.tpl
locate
Code:
<tr>
<td width="25"> </td>
<td width="200" class="content2">{TR_CPU_MODEL}</td>
<td class="content2">{CPU_MODEL}</td>
</tr>
add above
Code:
<tr>
<td width="25"> </td>
<td width="200" class="content2">{TR_CPU_COUNT}</td>
<td class="content2">{CPU_COUNT}</td>
</tr>
Tidy the colours up
because you've added a new table row in the table colors will look off i.e. two rows the same colour)
to correct this change the class="content" tags to alternate
i.e.
Code:
<tr>
<td width="25"> </td>
<td width="200" class="content2">{TR_CPU_COUNT}</td>
<td class="content2">{CPU_COUNT}</td>
</tr>
<tr>
<td width="25"> </td>
<td width="200" class="content">{TR_CPU_MODEL}</td>
<td class="content">{CPU_MODEL}</td>
</tr>
<tr>
<td width="25"> </td>
<td width="200" class="content2">{TR_CPU_MHZ}</td>
<td class="content2">{CPU_MHZ}</td>
</tr>
<tr>
<td width="25"> </td>
<td width="200" class="content">{TR_CPU_CACHE}</td>
<td class="content">{CPU_CACHE}</td>
</tr>
<tr>
<td width="25"> </td>
<td width="200" class="content2">{TR_CPU_BOGOMIPS}</td>
<td class="content2">{CPU_BOGOMIPS}</td>
</tr>
Now you should have the following showing
Bare in mind you colours will look different as I've created my own colour scheme
I've also attached my edited files.