From 78f707959689f3221a52171875ab83104982c3ec Mon Sep 17 00:00:00 2001 From: runesk Date: Tue, 17 Mar 2009 12:35:31 +0000 Subject: [PATCH] Closes 2080844 git-svn-id: svn://svn.code.sf.net/p/muninlite/code/muninlite@20 35caa317-6b62-4e8a-81c0-b04f0c356266 --- plugins/df | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/df b/plugins/df index 623a1f1..2971618 100644 --- a/plugins/df +++ b/plugins/df @@ -4,9 +4,9 @@ graph_args --upper-limit 100 -l 0 graph_vlabel % graph_category disk graph_info This graph shows disk usage on the machine." - for PART in $(df | sed '/\/[a-z0-9]*$/!d;s/.* \([a-z0-9\/]\{1,\}\)$/\1/g') + for PART in $(df -P | grep '^/' | sed '/\/[a-z0-9]*$/!d;s/.* \([a-z0-9\/]\{1,\}\)$/\1/g') do - PINFO=$(df $PART | tail -1); + PINFO=$(df -P $PART | tail -1); PNAME=$(echo $PINFO | cut -d\ -f1 | sed 's/\//_/g') echo "$PNAME.label $PART" echo "$PNAME.info $PNAME -> $PART" @@ -15,10 +15,10 @@ graph_info This graph shows disk usage on the machine." done } fetch_df() { - for PART in $(df | sed '/\/[a-z0-9]*$/!d;s/.* \([a-z0-9\/]\{1,\}\)$/\1/g') + for PART in $(df -P | grep '^/' | sed '/\/[a-z0-9]*$/!d;s/.* \([a-z0-9\/]\{1,\}\)$/\1/g') do - PINFO=$(df $PART | tail -1); - PNAME=$(echo $PINFO | cut -d\ -f1 | sed 's/\//_/g') + PINFO=$(df -P $PART | tail -1); + PNAME=$(echo $PINFO | cut -d\ -f1 | sed 's/[\/.-]/_/g') echo "$PNAME.value" $(echo $PINFO | cut -f5 -d\ | sed -e 's/\%//g') done }