Changeset 680

Show
Ignore:
Timestamp:
01/28/05 14:25:34 (7 years ago)
Author:
lupe
Message:

Add support for FreeBSD 4.x ramdisks

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/node/node.d.freebsd/df.in

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r201 r680  
    99# 
    1010# $Log$ 
     11# Revision 1.5  2005/01/28 13:25:34  lupe 
     12# Add support for FreeBSD 4.x ramdisks 
     13# 
    1114# Revision 1.4  2004/05/20 19:02:36  jimmyo 
    1215# Set categories on a bunch of plugins 
     
    1417# Revision 1.3  2004/05/18 22:04:30  jimmyo 
    1518# Use "sed 1d" instead of "tail +2" in df plugins (patch by Olivier Delhomme). 
     19# 
     20# Revision 1.2.2.1  2005/01/25 10:32:40  lupe 
     21# Add support for FreeBSD 4.x ramdisks 
    1622# 
    1723# Revision 1.2  2004/02/01 19:00:29  lupe 
     
    4854        echo 'graph_args --upper-limit 100 -l 0' 
    4955        echo 'graph_vlabel %' 
    50         echo 'graph_category disk' 
    51         /bin/df -P -t noprocfs,devfs,fdescfs,linprocfs,nfs | sed 1d | grep -v "//" | while read i; do 
    52                 name=`echo $i | sed 's/[\/.-]/_/g'| awk '{ print $1 }'` 
     56        mfs=0 
     57        /bin/df -P -t noprocfs,devfs,fdescfs,linprocfs,nfs | tail +2 | grep -v "//" | while read i; do 
     58                case $i in 
     59                mfs:*) name=mfs$mfs; mfs=`expr $mfs + 1`;; 
     60                *) name=`echo $i | awk '{ gsub("[^a-zA-Z0-9_]", "_", $1); print $1 }'` ;; 
     61                esac 
    5362                echo -n "$name.label " 
    5463                echo $i | awk '{ print $6 }' 
     
    5968fi 
    6069 
    61 /bin/df -P -t noprocfs,devfs,fdescfs,linprocfs,nfs | sed 1d | grep -v "//" | while read i; do 
    62         name=`echo $i | sed 's/[\/.-]/_/g'| awk '{ print $1 ".value " }'` 
    63         echo -n "$name " 
     70mfs=0 
     71/bin/df -P -t noprocfs,devfs,fdescfs,linprocfs,nfs | tail +2 | grep -v "//" | while read i; do 
     72        case $i in 
     73        mfs:*) name=mfs$mfs; mfs=`expr $mfs + 1`;; 
     74        *) name=`echo $i | awk '{ gsub("[^a-zA-Z0-9_]", "_", $1); print $1 }'` ;; 
     75        esac 
     76        echo -n "$name.value " 
    6477        echo $i | awk '{ print $5 }' | cut -f1 -d% 
    6578done 
  • trunk/node/node.d.freebsd/df_inode.in

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r201 r680  
    99# 
    1010# $Log$ 
     11# Revision 1.5  2005/01/28 13:25:34  lupe 
     12# Add support for FreeBSD 4.x ramdisks 
     13# 
    1114# Revision 1.4  2004/05/20 19:02:36  jimmyo 
    1215# Set categories on a bunch of plugins 
     
    1417# Revision 1.3  2004/05/18 22:04:30  jimmyo 
    1518# Use "sed 1d" instead of "tail +2" in df plugins (patch by Olivier Delhomme). 
     19# 
     20# Revision 1.2.2.1  2005/01/25 10:32:40  lupe 
     21# Add support for FreeBSD 4.x ramdisks 
    1622# 
    1723# Revision 1.2  2004/02/01 19:00:29  lupe 
     
    3743 
    3844print_values() { 
    39         /bin/df -P -i -t noprocfs,devfs,fdescfs,linprocfs,nfs | sed 1d | grep -v "//" | while read i; do 
    40                 name=`echo $i | sed 's/[\/.]/_/g'| awk '{ print $1 ".value " }'` 
    41                 echo -n "$name " 
     45        mfs=0 
     46        /bin/df -P -i -t noprocfs,devfs,fdescfs,linprocfs,nfs | tail +2 | grep -v "//" | while read i; do 
     47                case $i in 
     48                mfs:*) name=mfs$mfs; mfs=`expr $mfs + 1`;; 
     49                *) name=`echo $i | awk '{ gsub("[^a-zA-Z0-9_]", "_", $1); print $1 }'` ;; 
     50                esac 
     51                echo -n "$name.value " 
    4252                echo $i | awk '{ print $8 }' | cut -f1 -d% 
    4353        done 
     
    5868        echo 'graph_args --upper-limit 100 -l 0' 
    5969        echo 'graph_vlabel %' 
    60         echo 'graph_category disk' 
    61         /bin/df -P -i -t noprocfs,devfs,fdescfs,linprocfs,nfs | sed 1d | grep -v "//" | while read i; do 
    62                 name=`echo $i | sed 's/[\/.]/_/g'| awk '{ print $1 }'` 
     70        mfs=0 
     71        /bin/df -P -i -t noprocfs,devfs,fdescfs,linprocfs,nfs | tail +2 | grep -v "//" | while read i; do 
     72                case $i in 
     73                mfs:*) name=mfs$mfs; mfs=`expr $mfs + 1`;; 
     74                *) name=`echo $i | awk '{ gsub("[^a-zA-Z0-9_]", "_", $1); print $1 }'` ;; 
     75                esac 
    6376                echo -n "$name.label " 
    6477                echo $i | awk '{ print $9 }'