From 8821ff4ea8e1c06954dc5ea2604ed6785652af47 Mon Sep 17 00:00:00 2001 From: toni Date: Fri, 17 Oct 2014 20:02:05 +0200 Subject: replaced iostat with iotop (iostat gives false results) --- configs/xmobar_hddusage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/xmobar_hddusage.sh b/configs/xmobar_hddusage.sh index e8285e4..bea8391 100755 --- a/configs/xmobar_hddusage.sh +++ b/configs/xmobar_hddusage.sh @@ -1,9 +1,9 @@ #!/bin/bash if [ "x$1" = "xread" ]; then - OUT=$(iostat | sed -n 's/sda\s*[0-9,]*\s*\([0-9]*\).*$/\1/p') + OUT=$(sudo iotop -b -n 1 -P -k -qq | sed -n 's/^Total DISK READ:\s*\([0-9]*\)\..*$/\1/p') elif [ "x$1" = "xwrite" ]; then - OUT=$(iostat | sed -n 's/sda\s*[0-9,]*\s*[0-9,]*\s*\([0-9]*\).*$/\1/p') + OUT=$(sudo iotop -b -n 1 -P -k -qq | sed -n 's/^.*Total DISK WRITE:\s*\([0-9]*\)\..*$/\1/p') else exit 1 fi -- cgit v1.2.3