From 7939774029fb0ecd5f48cc35199e4b9b4c2407ec Mon Sep 17 00:00:00 2001
From: Jan Grewe <jan@faked.org>
Date: Tue, 6 Sep 2016 21:24:07 +0200
Subject: [PATCH] ensure that numfmt gets an uppercase unit increase graph
 sizes

---
 bcache/bcache.sh                                        | 8 ++++----
 bcache/cacti_graph_template_bcache_-_bypassed_bytes.xml | 4 ++--
 bcache/cacti_graph_template_bcache_-_dirty_data.xml     | 4 ++--
 bcache/cacti_graph_template_bcache_-_hit_rate.xml       | 4 ++--
 bcache/cacti_graph_template_bcache_-_requests.xml       | 4 ++--
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/bcache/bcache.sh b/bcache/bcache.sh
index 6f0fd3b..15a9721 100644
--- a/bcache/bcache.sh
+++ b/bcache/bcache.sh
@@ -13,7 +13,7 @@ BYPASSED=0
 get_dirty_data () {
   for dev in "${PATH}/${1}/bdev*/"; do
     local size=$(<${dev}/dirty_data)
-    local bytes=$(/usr/bin/numfmt --from=iec ${size})
+    local bytes=$(/usr/bin/numfmt --from=iec ${size^^})
     DIRTY_DATA=$(( ${DIRTY_DATA} + ${bytes} ))
   done
 }
@@ -25,7 +25,7 @@ get_hitrate () {
     if [ -z ${hitrate} ]; then
       hitrate=${dev_hr}
     fi
-    hitrate=$(( (${hitrate} + ${dev_hr}) / 2 )) 
+    hitrate=$(( (${hitrate} + ${dev_hr}) / 2 ))
   done
   eval HITRATE_${2}=${hitrate}
 }
@@ -40,7 +40,7 @@ get_requests () {
 get_bypassed () {
   for dev in "${PATH}/${1}/bdev*/"; do
     local size=$(<${dev}/stats_five_minute/bypassed)
-    local bytes=$(/usr/bin/numfmt --from=iec ${size}) 
+    local bytes=$(/usr/bin/numfmt --from=iec ${size^^})
     BYPASSED=$(( ${BYPASSED} + ${bytes} ))
   done
 }
@@ -74,4 +74,4 @@ echo "bb:${BYPASSED}\
  req_mc:${REQUEST_miss_collisions}\
  req_ra:${REQUEST_readaheads}"
 
-exit 0
+exit 0
\ No newline at end of file
diff --git a/bcache/cacti_graph_template_bcache_-_bypassed_bytes.xml b/bcache/cacti_graph_template_bcache_-_bypassed_bytes.xml
index 69cb059..9720f81 100644
--- a/bcache/cacti_graph_template_bcache_-_bypassed_bytes.xml
+++ b/bcache/cacti_graph_template_bcache_-_bypassed_bytes.xml
@@ -7,9 +7,9 @@
 			<t_image_format_id></t_image_format_id>
 			<image_format_id>1</image_format_id>
 			<t_height></t_height>
-			<height>120</height>
+			<height>200</height>
 			<t_width></t_width>
-			<width>500</width>
+			<width>600</width>
 			<t_slope_mode></t_slope_mode>
 			<slope_mode>on</slope_mode>
 			<t_auto_scale></t_auto_scale>
diff --git a/bcache/cacti_graph_template_bcache_-_dirty_data.xml b/bcache/cacti_graph_template_bcache_-_dirty_data.xml
index c9d02e8..c4ee452 100644
--- a/bcache/cacti_graph_template_bcache_-_dirty_data.xml
+++ b/bcache/cacti_graph_template_bcache_-_dirty_data.xml
@@ -7,9 +7,9 @@
 			<t_image_format_id></t_image_format_id>
 			<image_format_id>1</image_format_id>
 			<t_height></t_height>
-			<height>120</height>
+			<height>200</height>
 			<t_width></t_width>
-			<width>500</width>
+			<width>600</width>
 			<t_slope_mode></t_slope_mode>
 			<slope_mode>on</slope_mode>
 			<t_auto_scale></t_auto_scale>
diff --git a/bcache/cacti_graph_template_bcache_-_hit_rate.xml b/bcache/cacti_graph_template_bcache_-_hit_rate.xml
index 5c71462..f5af1e3 100644
--- a/bcache/cacti_graph_template_bcache_-_hit_rate.xml
+++ b/bcache/cacti_graph_template_bcache_-_hit_rate.xml
@@ -7,9 +7,9 @@
 			<t_image_format_id></t_image_format_id>
 			<image_format_id>1</image_format_id>
 			<t_height></t_height>
-			<height>120</height>
+			<height>200</height>
 			<t_width></t_width>
-			<width>500</width>
+			<width>600</width>
 			<t_slope_mode></t_slope_mode>
 			<slope_mode>on</slope_mode>
 			<t_auto_scale></t_auto_scale>
diff --git a/bcache/cacti_graph_template_bcache_-_requests.xml b/bcache/cacti_graph_template_bcache_-_requests.xml
index 1417100..c90b14e 100644
--- a/bcache/cacti_graph_template_bcache_-_requests.xml
+++ b/bcache/cacti_graph_template_bcache_-_requests.xml
@@ -7,9 +7,9 @@
 			<t_image_format_id></t_image_format_id>
 			<image_format_id>1</image_format_id>
 			<t_height></t_height>
-			<height>120</height>
+			<height>200</height>
 			<t_width></t_width>
-			<width>500</width>
+			<width>600</width>
 			<t_slope_mode></t_slope_mode>
 			<slope_mode>on</slope_mode>
 			<t_auto_scale></t_auto_scale>
-- 
GitLab