support stat less than 1G 95/1295/1
authorGrinberg Moti <mg877n@att.com>
Thu, 23 Feb 2017 14:23:14 +0000 (16:23 +0200)
committerGrinberg Moti <mg877n@att.com>
Thu, 23 Feb 2017 14:23:14 +0000 (16:23 +0200)
Change-Id: I0a1fcfd5e545adee98a8d94ea3fbcd4ea8c7c063
Signed-off-by: Grinberg Moti <mg877n@att.com>
sdc-os-chef/scripts/docker_stats.sh

index 0047fe4..1759569 100644 (file)
@@ -30,6 +30,10 @@ grep -v "^\-" ${FILE} |grep -v ^CONT| awk 'BEGIN {
   d=$6"-"$2"-"substr("00",0,2-length($3))$3"-"substr($4,0,5)
   next
 }
+/MiB/ {
+   print $1" "d" "$3/1024" "$8
+   next
+}
 /GiB/ {
    print $1" "d" "$3" "$8
    next