Is there a way I can start a program and then record a log of how much memory it's using at a specific interval until the program ends?
I've tried writing a shell script but get the error:
./apps/mem-test.sh: line 4: [: too many arguments
Here's the non-working script:
Code:
$HOME/apps/ImageMagick/bin/convert -limit memory 64 -limit map 128 $HOME/SSI/davidkennardphotography/Img-Orig/95-Pole-Bank.jpg -set option:filter:filter Lanczos -set option:filter:blur 0.8 -resize 1024x720 $HOME/resizedImage.jpg &
GOODY="ps -p $! -o pid,%cpu,rss,cmd | grep convert >>test.txt"
while [ $GOODY -ne '' ]
do
sleep 0.5
done
Thanks
Dave
Bookmarks