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

General questions about Indigo, the scene format, rendering etc...
Post Reply
7 posts • Page 1 of 1
lego
Posts: 99
Joined: Sat Oct 14, 2006 7:29 am

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

Post by lego » Mon Nov 13, 2006 8:49 am

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

atmmatt
Posts: 104
Joined: Sun Oct 22, 2006 4:33 am
Location: Pennsylvania - USA

Post by atmmatt » Mon Nov 13, 2006 9:29 am

So does this start the render from scratch or where it left off?
"To be, or not to be" That is a question?

lego
Posts: 99
Joined: Sat Oct 14, 2006 7:29 am

Post by lego » Mon Nov 13, 2006 9:33 am

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.

User avatar
DaveC
Posts: 596
Joined: Mon Sep 11, 2006 12:20 am
Location: The Tottenham, London, UK
Contact:

Post by DaveC » Mon Nov 13, 2006 9:56 am

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?
The hardest part of BEING yourself is FINDING yourself in the first place...
http://thebigdavec.googlepages.com

User avatar
u3dreal
Posts: 346
Joined: Sun Jul 02, 2006 10:36 am

Post by u3dreal » Mon Nov 13, 2006 12:37 pm

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 ;)

lego
Posts: 99
Joined: Sat Oct 14, 2006 7:29 am

Post by lego » Tue Nov 14, 2006 5:48 am

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? :)

lego
Posts: 99
Joined: Sat Oct 14, 2006 7:29 am

Post by lego » Tue Nov 14, 2006 8:30 am

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... :(

Post Reply
7 posts • Page 1 of 1