diff options
-rw-r--r-- | usr/local/www/includes/functions.inc.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php index 6abbf75..7cb93fb 100644 --- a/usr/local/www/includes/functions.inc.php +++ b/usr/local/www/includes/functions.inc.php @@ -123,9 +123,8 @@ function disk_usage() function swap_usage() { - $swapUsage = `/usr/sbin/swapinfo | /usr/bin/cut -c45-55 | /usr/bin/grep "%"`; + $swapUsage = `/usr/sbin/swapinfo | /usr/bin/awk '{print $5;'}|/usr/bin/grep '%'`; $swapUsage = ereg_replace('%', "", $swapUsage); - $swapUsage = ereg_replace(' ', "", $swapUsage); $swapUsage = rtrim($swapUsage); return $swapUsage; |