forked from libuv/libuv
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux: read load average from /proc/loadavg
It was reported that uv_loadavg() reports the wrong values inside an lxc container. Libuv calls sysinfo(2) but that isn't intercepted by lxc. /proc/loadavg however is because /proc is a FUSE fs inside the container. This commit makes libuv try /proc/loadavg first and fall back to sysinfo(2) in case /proc isn't mounted. This commit is very similar to commit 3a1be72 ("linux: read free/total memory from /proc/meminfo") from April 2019. Fixes: nodejs/node#33791
- Loading branch information
1 parent
12704a4
commit 5f56d74
Showing
3 changed files
with
21 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters