Skip to content

Instantly share code, notes, and snippets.

@binux
Created April 11, 2012 16:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save binux/2360328 to your computer and use it in GitHub Desktop.
Save binux/2360328 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -x
sleep 10 &
PID=$!
while kill -0 $PID
do
ps h -o pcpu,pmem -p $PID
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment