Page 1 of 1

linux indigo resumer! (lol, it's not what you're thinking)

Posted: Mon Nov 13, 2006 8:49 am
by lego
today Indigo crashed two times, so I decided to create a little script to solve the matter!
Since the one crashing is always the process that does the rendering, I created a script that launches a network master and a slave. Then it checks periodically for the slave, and launches it again if it's closed :)

It's my first script, so I don't know if it works correctly... I tested it closing the processes manually, and it seems to work :)


I don't assume any responsibility for the use of this script. Use it only if you know what you are doing :P

Feel free to improve it

Code: Select all

#!/bin/bash
cd ~/indigo/
wine indigo.exe -n m $1 &
sleep 5s
while true; do 
	ps axuw | grep -v grep | grep indigo.exe | grep 'n s' || 
        (ps axuw | grep -v grep | grep indigo.exe | grep 'n m' && 
        wine indigo.exe -n s $1 &)
	sleep 5m
done
Obviously you have to change
cd ~/indigo/
to your indigo directory

it takes the scene name as a parameter

save the script somewhere and call it "indigo"
write in the terminal
sudo chmod 711 indigo
then you can launch it writing
. indigo scenename.xml


the scene file needs to be in your indigo directory


p.s. you can change the frequency of the checks by changing the line
sleep 5m

m -> minutes
s -> seconds

Posted: Mon Nov 13, 2006 9:29 am
by atmmatt
So does this start the render from scratch or where it left off?

Posted: Mon Nov 13, 2006 9:33 am
by lego
atmmatt wrote:So does this start the render from scratch or where it left off?
the render doesn't stop if the network process is alive.
this script just relaunches the slave process if it crashes.

Posted: Mon Nov 13, 2006 9:56 am
by DaveC
Clever man. I like it. I don't use linux (not through choice) but I have a question. If the slave stops, are all CPU resources released? Or does the Master process still hog the CPU? Hmmmmm?

Posted: Mon Nov 13, 2006 12:37 pm
by u3dreal
Cool lego...

i have same problem with one of my machines... but it seems that
KDE crashes...is it same for you ..

then maybe your script may help me too...

cheers

u3dreal ;)

Posted: Tue Nov 14, 2006 5:48 am
by lego
I've ported the script to python
I'm planning to add a 'stop at x mutations function' and a very simple animations handling :)
Anyone has a better idea than kill to stop indigo? :)

Posted: Tue Nov 14, 2006 8:30 am
by lego
the script is almost done, handles slave resume and max muts/pixel halt well :)

the only problem is that I need a better way to stop indigo than kill... :(