From c1573d8ef2e34429a67a69c3ad947505a5772931 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 18 Nov 2010 13:09:10 -0800 Subject: Use sys_getloadavg() instead of reading /proc/loadavg. Fixes #1491. --- modules/gallery/helpers/gallery_block.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php index cb28cbcd..3e2a7313 100644 --- a/modules/gallery/helpers/gallery_block.php +++ b/modules/gallery/helpers/gallery_block.php @@ -70,12 +70,7 @@ class gallery_block_Core { $block->css_id = "g-platform"; $block->title = t("Platform information"); $block->content = new View("admin_block_platform.html"); - if (@is_readable("/proc/loadavg") && $first_line = current(@file("/proc/loadavg"))) { - $block->content->load_average = - join(" ", array_slice(explode(" ", $first_line), 0, 3)); - } else { - $block->content->load_average = t("Unavailable"); - } + $block->content->load_average = join(" ", sys_getloadavg()); break; case "project_news": -- cgit v1.2.3