diff --git a/bcache/bcache.sh b/bcache/bcache.sh index 6f0fd3b946b7c79730f1b559d1957cc768ea2d62..15a97213f67225a7b29c0361f102ce007b1bfd69 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 69cb059ce15ee606634f5f707aeae28889ece08b..9720f81e574d211ef69f631aadfbf252180ab9fe 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 c9d02e8805a314862d63af945e34e98a85bb7e4f..c4ee452f7b1a9d79c86238260e955f4c9b1d3a3f 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 5c71462adc10b0f8dcf860ade312bdc93a45c0a6..f5af1e3dcb7ec99de937ad168c85b39995aabb68 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 1417100af2f814e347b8afa252589189b3440515..c90b14e2e0e76cdddc5bf1744a8fe7dcf886e1f1 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>