summaryrefslogtreecommitdiff
path: root/net-mgmt/cacti/files/patch-fix_df_output
blob: 705f16930164022546c3f491d5d66b5bdbb66c9b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- scripts/diskfree.pl.orig	Fri Apr 29 17:32:01 2005
+++ scripts/diskfree.pl	Wed Mar 23 02:19:37 2005
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-$ret = `df --block-size=1024 -P $ARGV[0] | grep -v Filesystem`;
+$ret = `df -k $ARGV[0] | grep -v Filesystem`;
 $ret =~ s/($ARGV[0])(.* )(.*[0-9])(.* )(.*[0-9])(.* )(.*[0-9])(.* )(.*[0-9])%(.* )//;
 
 print "megabytes:$7 percent:$9";
--- scripts/diskfree.sh.orig	Fri Apr 29 17:32:01 2005
+++ scripts/diskfree.sh	Wed Mar 23 02:19:47 2005
@@ -1,2 +1,2 @@
 #!/bin/sh
-df --block-size=1024 -P $1 | perl -ape '$F[4]=~tr/%//d;}{print "megabytes:$F[3] percent:$F[4]"';
+df -k $1 | perl -ape '$F[4]=~tr/%//d;}{print "megabytes:$F[3] percent:$F[4]"';
--- scripts/query_unix_partitions.pl.orig	Sat Apr 30 01:50:01 2005
+++ scripts/query_unix_partitions.pl	Sat Apr 30 01:50:13 2005
@@ -5,7 +5,7 @@
 	exit;
 }
 
-open(DF, "/bin/df -P|");
+open(DF, "/bin/df -k|");
 
 while (<DF>) {
 	#/dev/hda2             20157744  18553884    579860  97% /var