Skip to content

Commit

Permalink
Merge pull request #734 from nextcloud/backport/733/stable30
Browse files Browse the repository at this point in the history
[stable30] fix(freebsd): fix cpu count for load graph
  • Loading branch information
joshtrichards authored Jan 18, 2025
2 parents 4cd9517 + d3f4e16 commit 5285aea
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 5285aea

Please sign in to comment.