Closes 2080844

git-svn-id: svn://svn.code.sf.net/p/muninlite/code/muninlite@20 35caa317-6b62-4e8a-81c0-b04f0c356266
This commit is contained in:
runesk 2009-03-17 12:35:31 +00:00
parent a18de9ac24
commit 78f7079596
1 changed files with 5 additions and 5 deletions

View File

@ -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
}