| @@ 105-110 (lines=6) @@ | ||
| 102 | ->setLeftOver($leftOver); |
|
| 103 | ||
| 104 | if ($leftOver === 0) { |
|
| 105 | if ( |
|
| 106 | $cpuUsage <= $this->cpuThreshold[0] || |
|
| 107 | $loadAverage <= $this->loadAverageThreshold[0] |
|
| 108 | ) { |
|
| 109 | $alert->setUnderUsed(); |
|
| 110 | } |
|
| 111 | } else if ($leftOver > 0) { |
|
| 112 | if ( |
|
| 113 | $cpuUsage >= $this->cpuThreshold[1] || |
|
| @@ 112-117 (lines=6) @@ | ||
| 109 | $alert->setUnderUsed(); |
|
| 110 | } |
|
| 111 | } else if ($leftOver > 0) { |
|
| 112 | if ( |
|
| 113 | $cpuUsage >= $this->cpuThreshold[1] || |
|
| 114 | $loadAverage >= $this->loadAverageThreshold[1] |
|
| 115 | ) { |
|
| 116 | $alert->setOverUsed(); |
|
| 117 | } |
|
| 118 | } |
|
| 119 | ||
| 120 | if (!$alert->isUnderUsed() && !$alert->isOverUsed()) { |
|