Skip to content

Commit

Permalink
fix(freebsd): fix cpu count for load graph
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Wener <125427297+ConstrictM@users.noreply.github.com>
  • Loading branch information
ConstrictM authored and kesselb committed Jan 18, 2025
1 parent 4cd9517 commit d3f4e16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/OperatingSystems/FreeBSD.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ public function getCpuCount(): int {
$numCpu = -1;

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

return $numCpu;
Expand Down

0 comments on commit d3f4e16

Please sign in to comment.