New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In an LXC container, the website displays a ‘load average’ that is very different from top #5565
Comments
You can disable the Pi-hole warning adding |
As a test, please post the output of the following commands inside the container and on the host: php -r 'echo implode(" ", sys_getloadavg())."\n";' && cat /proc/loadavg && uptime (this will only work on the host, if PHP is installed) |
host:
container:
|
Same problem here. Quick n dirty fix for me: Edit header_authenticated.php Search for: // Get CPU load
$loaddata = sys_getloadavg();
foreach ($loaddata as $key => $value) {
$loaddata[$key] = round($value, 2);
} Change to function loadavg()
{
exec("cat /proc/loadavg", $loadavg);
$loaddata = explode(" ", $loadavg[0]);
unset($loaddata[3]);
unset($loaddata[4]);
foreach ($loaddata as $key => $value) {
$loaddata[$key] = round($value, 2);
}
return array($loaddata[0], $loaddata[1], $loaddata[2]);
}
$loaddata = loadavg(); |
That solution works for me. Thanks nevermind. If after the pi-hole updates, this still works, I'm satisfied. |
Same situation here too. |
would be good for everyone to post here in support of LXC fixing the underlying issue. |
I'm the OP of the issue mentioned in this post. It looks LXC devs see it as a problem somewhere else, not in LXC - which is, of course, entirely possible, but I'm not fully convinced yet. I think that to move this issue forward a bit, we'd need to collect some more info to help with triaging. If you find evidence that points to LXC 5 (major version is important, as the problem appeared there) being at fault, please post it there in that LXC issue. For anything else, we'd need to find the appropriate upstream. |
This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days. |
Versions
Pi-hole version is v5.17.3 (Latest: v5.17.3)
web version is v5.21 (Latest: v5.21)
FTL version is v5.24 (Latest: v5.24)
Platform
The platform is an LXC container that uses a Debian 12 template on a Proxmox VE 7.4.
Expected behavior
I expected to see the same load average values on the web as shown by the
top
command (around 1).Actual behavior / bug
However, instead, values around 5 (belonging to the host) are displayed.
Steps to reproduce
Steps to reproduce the behavior:
104.conf
:apt update && apt upgrade
cd ~
wget -O basic-install.sh https://install.pi-hole.net
bash basic-install.sh
apt install unbound -y
nano /etc/unbound/unbound.conf.d/pi-hole.conf
nano /etc/dnsmasq.d/99-edns.conf
Through the web, uncheck all Upstream DNS Servers and check and add a custom
127.0.0.1#5335
.Debug Token
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: