Import using 100% CPU
Posted: 2008-05-20T08:53:01-07:00
I want to use import to take regular pictures of my desktop, so I setup a bash script to sleep 10 minutes, then use import and repeat.
The only issue is that import uses 100% CPU every time it runs, so X locks up for 3-5 seconds while import runs. I tried using nice, but it didn't help any.
I know it's a bit of an off-topic question, but I thought I'd ask since it'd be helpful for me.
Code: Select all
#!/bin/bash
while true; do
directory=/home/jhendric/screenshots/`date +%b%d`
if [ ! -e "$directory" ]; then
mkdir $directory
fi
import -window root -silent $directory/`date +%H%M`.gif
sleep 10m
done
I know it's a bit of an off-topic question, but I thought I'd ask since it'd be helpful for me.