Skip to content

Commit d3f4e16

Browse files
ConstrictMkesselb
authored andcommitted
fix(freebsd): fix cpu count for load graph
Signed-off-by: Matthew Wener <125427297+ConstrictM@users.noreply.github.com>
1 parent 4cd9517 commit d3f4e16

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/OperatingSystems/FreeBSD.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ public function getCpuCount(): int {
7979
$numCpu = -1;
8080

8181
try {
82-
$numCpu = intval($this->executeCommand('sysctl -n hw.ncpu')); //TODO: this should be tested if it actually works on FreeBSD
82+
$numCpu = intval($this->executeCommand('/sbin/sysctl -n hw.ncpu'));
8383
} catch (RuntimeException) {
84+
return $numCpu;
8485
}
8586

8687
return $numCpu;

0 commit comments

Comments
 (0)