[GRASS-SVN] r40168 - grass-addons/tools

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 31 01:18:51 EST 2009


Author: hamish
Date: 2009-12-31 01:18:50 -0500 (Thu, 31 Dec 2009)
New Revision: 40168

Added:
   grass-addons/tools/mem_follow.sh
Log:
a little script to track module memory use for later analysis/plotting

Added: grass-addons/tools/mem_follow.sh
===================================================================
--- grass-addons/tools/mem_follow.sh	                        (rev 0)
+++ grass-addons/tools/mem_follow.sh	2009-12-31 06:18:50 UTC (rev 40168)
@@ -0,0 +1,19 @@
+#!/bin/sh
+# a little script to track module memory use
+#  Hamish Bowman, 31 Dec 2009   (released to the public domain)
+
+FOLLOW=r.in.xyz
+OUTFILE="$FOLLOW.memlog"
+SLEEP=5
+
+echo "date sec_since_1970 VirtMemSize   ResMemSize" > "$OUTFILE"
+
+while [ "`ps -C $FOLLOW > /dev/null; echo $?`" -eq 0 ] ; do
+   #Memory: VirtSize   ResSize
+   MEMUSE=`ps rxl | grep "$FOLLOW" | awk '{print $7 "   " $8 }'`
+
+   echo "`date`  `date +%s`  $MEMUSE" >> "$OUTFILE"
+
+   sleep $SLEEP
+done
+


Property changes on: grass-addons/tools/mem_follow.sh
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/x-sh
Added: svn:eol-style
   + native



More information about the grass-commit mailing list