query generated smart files
[gnt-info] / gnt-pv-usage.sh
index 8b26ff8..3f29a75 100755 (executable)
@@ -1,2 +1,4 @@
-gnt-cluster command -M pvs --units t --noheadings | grep -v '^return' | awk '{ print $0 " " $6 - $7 }'
+#!/bin/sh -xe
+
+gnt-cluster command -M pvs --units t | grep -v '^return' | awk '{ if ( $6 - $7 != 0 ) print $0 " " $6 - $7 ; else print $0 ; }' | tee /dev/shm/gnt-pv-usage