www.BinaryAlchemy.de :: View topic - Run batch scripts when RRsrv sends shutdown/WOL commands
 SearchSearch   RegisterRegister  ProfileProfile   UsergroupsUsergroups   Log inLog in 
If you create a new post, please use a topic that describes your problem
Documento sin título
 
Run batch scripts when RRsrv sends shutdown/WOL commands

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.BinaryAlchemy.de Forum Index -> old - RR Questions - v6.x
View previous topic :: View next topic  
Author Message

sconstable



Joined: 28 Oct 2008
Posts: 12
Location/Company/Country: Munich, Germany

PostPosted: Sun Nov 10, 2013 4:35 pm    Post subject: Run batch scripts when RRsrv sends shutdown/WOL commands Reply with quote

Hi,

is it possible to have a batch script automatically executed when the RRserver is sending the WOL and the shutdown commands to a specific client?

Eg.: client-1 gets a WOL command and a bat file is executed. If client-2 gets its WOL command, a different bat-file will be executed...and so on. Same for the shutdown commands initiated by RRserver.
I've read about Pre/Post/Done script in the RR docs, but they are related to renderjobs, not to the WOL and shutdown commands.


Thanks in advance,
Sven
Back to top
View user's profile Send private message Visit poster's website

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Mon Nov 11, 2013 2:05 pm    Post subject: Reply with quote

Hi

There is no such possibility.
But you can easily implement a shutdown and startup script via the OS of the client, RR is not required for it.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

sconstable



Joined: 28 Oct 2008
Posts: 12
Location/Company/Country: Munich, Germany

PostPosted: Mon Nov 11, 2013 3:53 pm    Post subject: Reply with quote

Yeah, unfortunatly its not that easy to have a shutdown script be properly executed in windows, if it (the script itself) contains network commands. Because windows terminates the network connectivity and then runs the shutdown script afterwards. Meaning any network related commands in the bat file cannot work. But thats another story and of course not related to RR at all:)
I just asked here in the first place, because doing this via RR would have been the most direct and elegant solution. No problem at all. Now I can try some other approaches and thank you very much, Holger.

sven
Back to top
View user's profile Send private message Visit poster's website

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Mon Nov 11, 2013 4:26 pm    Post subject: Reply with quote

Ok, so you have your executable you want to run on shutdown on the network.
And therefore it fails.

What do you want to do?
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

sconstable



Joined: 28 Oct 2008
Posts: 12
Location/Company/Country: Munich, Germany

PostPosted: Mon Nov 11, 2013 6:06 pm    Post subject: Reply with quote

Well, this problem is not directly related to RR so I don't expect you to take any time on this. But you asked :)

(We're using Softimage and mental ray btw.)

I want to use satellite rendering on the farm. Everything works very well so far except for the autoshutdown of the satellite nodes. And I want everything fully automated (through RR or other ways, I don't care). Btw. I have enough RR client licences to manage the master machines and the satellites through RR.

My first approach was to manage that outside of RR: A master machine gets a WOL command from RRsrv, client starts, windows executes a startup-script. The batch script itself contains a WOL command, waking up its satellite machine. It also contains a netstart command for the RR service with a delay. So that the master will starts to render when its satellite is also up and running. Works like a charm.
However, as already mentioned a shutdown script on the master machine (executing a bat file that contains "shutdown /m \\satellite-xx /s /f /t 005" will not work. Windows terminates network connectivity before its runs the script.

Second thought was to use a logoff script instead of a shutdown script. That potentially works but that would require an autologon on the nodes. I dont like that idea and it also would invoke some other problems.

My third idea was, I simply create two groups in rrconfig, one named "Softimage" containing all masters, so that it will be assigned to any softimage renderjob per default. A second group called "Satellites" that will NOT be assigned to any job per default and use "autoshutdown if idle".
However, RR will shutdown the satellites even if they're rendering. (I assume because they're not rendering a job managed by RR. They just have the raysat.exe running with CPUs fully utilitized but they're reporting to RRsrv that they are idle. Therefore I cannot use autoshutdown by RRsrv for the satellite group.
I *could* set it to not-autoshutdown "if a user is logged in" but again, that would require an autologon...No go.

Well, I'm working on it.

One thing that comes into mind right now is to use autoshutdown (in rrconfig) and "Disable if processes found: raysat.exe". It disables the client service...and therefore it won't report an idle status to RRsrv. So RRsrv will not shutdown the node?
_________________
Sven Constable
Imagefront 3D & VFX
Back to top
View user's profile Send private message Visit poster's website

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Mon Nov 11, 2013 6:21 pm    Post subject: Reply with quote

I am not sure if a disabled client does not shutdown if nobody is logged in.

But if you would add raysat to disable the client and if that would prevent the client from shutting down, then it never shuts down...

Auto-login is a security issue, yes.
You could directly fire up a lock screen command via a startup script.
But I am not sure if you can prevent the startup scripts by pressing shift.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

sconstable



Joined: 28 Oct 2008
Posts: 12
Location/Company/Country: Munich, Germany

PostPosted: Mon Nov 11, 2013 7:05 pm    Post subject: Reply with quote

Quote:
But if you would add raysat to disable the client and if that would prevent the client from shutting down, then it never shuts down...

Yes it will. Because the raysat.exe process will be terminated if the xsibatch.exe process will be terminated on the master machine. In this case, when a job finished rendering.

You're right about the lock screen command. I did try this but it creates other problems. Something with remote desktop connection we're using to log into the nodes if neccesary. Don't remember exactly, but it was somehow impractical in the scenario.
_________________
Sven Constable
Imagefront 3D & VFX
Back to top
View user's profile Send private message Visit poster's website

sconstable



Joined: 28 Oct 2008
Posts: 12
Location/Company/Country: Munich, Germany

PostPosted: Tue Nov 12, 2013 11:12 am    Post subject: Reply with quote

Got it working. RR will NOT auto-shutdown a disabled client. No matter if a user is logged in or not.
_________________
Sven Constable
Imagefront 3D & VFX
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.BinaryAlchemy.de Forum Index -> old - RR Questions - v6.x All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 
Documento sin título
 



Powered by phpBB © 2001, 2002 phpBB Group



Number of shameful bots caught by Anti-Spam ACP: 1667