mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 06:30:13 +01:00
Merge branch 'master' of https://bitbucket.org/jsuto/piler
This commit is contained in:
commit
783dee3115
@ -60,12 +60,12 @@ class ControllerHealthWorker extends Controller {
|
||||
|
||||
|
||||
/* counter related stuff */
|
||||
|
||||
|
||||
$db = Registry::get('db');
|
||||
$db->select_db($db->database);
|
||||
|
||||
list($archivesizeraw, $this->data['counters']) = $this->model_stat_counter->get_counters();
|
||||
|
||||
|
||||
$oldest_record_timestamp = $this->model_health_health->get_oldest_record_ts();
|
||||
$total_number_days = round( (time() - $oldest_record_timestamp) / 86400 );
|
||||
|
||||
@ -77,11 +77,11 @@ class ControllerHealthWorker extends Controller {
|
||||
$this->data['sysinfo'] = $this->model_health_health->sysinfo();
|
||||
|
||||
$this->data['options'] = $this->model_health_health->get_options();
|
||||
|
||||
|
||||
$sqlsizeraw = $this->model_health_health->get_database_size();
|
||||
|
||||
|
||||
$sphinxsizeraw = $this->model_health_health->get_sphinx_size();
|
||||
|
||||
|
||||
/* message count variables */
|
||||
$averagemessagesweekraw = ($this->data['processed_emails'][1]) / 7; //average messages per day, computed over the past week
|
||||
$averagemessagesmonthraw = ($this->data['processed_emails'][2]) / 30; //average messages per day, computed over the past month
|
||||
@ -97,7 +97,7 @@ class ControllerHealthWorker extends Controller {
|
||||
foreach($this->data['shortdiskinfo'] as $part) {
|
||||
if( $part['partition'] == DATA_PARTITION ) { $datapart = $part['freespace']*1024; } // if the partition is the selected storage partition, record freespace on that partition
|
||||
}
|
||||
|
||||
|
||||
$this->data['oldestmessagets'] = $oldest_record_timestamp; // date of the oldest record in the db
|
||||
$this->data['averagemessages'] = round($averagemessagesweekraw); // rounded average of messages over the past week
|
||||
$this->data['averagemessagesize'] = nice_size($averagemessagesizeraw,' '); // formatted average message size on disk
|
||||
@ -112,7 +112,7 @@ class ControllerHealthWorker extends Controller {
|
||||
} else {
|
||||
$this->data['usagetrend'] = 0;
|
||||
}
|
||||
|
||||
|
||||
$this->render();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user