add parse scripts
[utp-swift.git] / parse / parse_memory_system
diff --git a/parse/parse_memory_system b/parse/parse_memory_system
new file mode 100755 (executable)
index 0000000..860a59b
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+awk '
+BEGIN  {
+       count = 0
+       init = 1
+       printf "memory\n"
+}
+
+/^Mem:/        {
+       count = 0
+       init = 0
+}
+
+{
+       count++
+       if (count == 2 && !init)
+               printf "%s\n", $3
+}
+'