mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:17:02 +02:00
revised cpu stat collection
This commit is contained in:
@ -193,6 +193,7 @@ $config['SPHINX_NOTE_INDEX'] = 'note1';
|
||||
|
||||
$config['RELOAD_COMMAND'] = 'sudo -n /etc/init.d/rc.piler reload';
|
||||
$config['PILERIMPORT_IMAP_COMMAND'] = '/usr/local/bin/pilerimport -d /var/piler/imap -q -r';
|
||||
$config['CPU_USAGE_COMMAND'] = "LC_ALL=C mpstat | tail -1 | awk '{print $11}'";
|
||||
|
||||
$config['LDAP_IMPORT_CONFIG_FILE'] = '/usr/local/etc/ldap-import.cfg';
|
||||
|
||||
|
@ -50,7 +50,8 @@ class ControllerHealthWorker extends Controller {
|
||||
|
||||
list ($this->data['uptime'], $this->data['cpuload']) = $this->model_health_health->uptime();
|
||||
|
||||
$this->data['cpuinfo'] = 100 - (int)file_get_contents(CPUSTAT);
|
||||
$x = system(CPU_USAGE_COMMAND);
|
||||
$this->data['cpuinfo'] = 100 - (int)$x;
|
||||
|
||||
$this->data['quarantinereportinfo'] = @file_get_contents(DAILY_QUARANTINE_REPORT_STAT);
|
||||
|
||||
|
Reference in New Issue
Block a user