14 Sep 2012
Notes to myself more than anything, and not really specific to Go (but that’s where I was using it).
To watch the memory usage of a process with pid PID:
while [ 1 ] ; do grep VmSize /proc/PID/status ; sleep 10 done
To watch the number of file descriptors being used:
while [ 1 ] ; do sudo lsof -p PID | wc -l ; sleep 10 done