AWS Thinkbox Discussion Forums

Streaming slave log through API

Hello,

I have been trying access the Slave log files in “Slave_name\ProgramData\Thinkbox\Deadline7\logs” with the scripting API without success. Through the docs i that i could get the logs after the job has failed/completed/etc but i do not see a function to grab the job log as its rendering in real time. In deadline monitor, there is a button “Connect to Slave Log” which returns the exact information i’m trying to access. What is the best way for me to grab that information?

We are using Deadline v7.2

Thanks!

Ah, that’s a mightly ancient Deadline but it supports streaming the Slave log via deadlinecommand which is actually what those log viewers are. We do some tricky stuff to change the icon though.

It depends when and from where you’re trying to grab that information, so you’ll likely want to lay out your use case so I can figure it out. In the mean time here’s how you can stream the logs yourself:

c:\Program Files\Thinkbox\Deadline10\bin\deadlinecommand.exe ConnectToSlaveLog [Slave name] false

I’m fairly certain that won’t work in a headless context as deadlinecommand is still going to try and load Qt, but if you’ve got a desktop it should work just fine.

I’m trying to grab that information on the deadline monitor. The deadlinecommand worked when I called it outside of the deadline monitor, but when i tried to called to call it in the monitor i would end up with this error.

2018-07-23 16:18:41:  PYTHON: Connecting to W4007...
2018-07-23 16:18:41:  PYTHON: Disconnecting while waiting for async connection

regular bash commands and even other deadline commands runs fine on the monitor

[code]
# command_line = ‘C:/Program Files/Thinkbox/Deadline7/bin/deadlinecommand.exe -help SubmitCommandLineJob’
# command_line = ‘echo blah blah blah’
command_line = ‘C:/Program Files/Thinkbox/Deadline7/bin/deadlinecommand.exe ConnectToSlaveLog %s false’ % slave
ping = subprocess.Popen(command_line, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

stdout, stderr = ping.communicate()[/code]

“Disconnecting while waiting for async connection” is a new one for me.

I know that popen() calls had some trouble on older versions within the Python.net API.

A slightly more important problem… It won’t exit on its own. I threw your code into a script and ran it through Deadline Command to make sure it’d work there, and it most certainly didn’t exit. Are you building a UI? I’m not sure if what you’re after is a trade-secret kind of thing but it would be great to have the mile-high view of the goals here. If it is, feel free to open a ticket and we can distill the essence of the problem solving here for others once we’ve figured out a good solution.

The idea would be have a UI similar to the “Connect to slave log” Ui that deadline monitor has. The way to open it would be to select one or multiple slaves and in the deadline monitor and “connect to multiple slave logs”. The added features of this UI would have a combo box listing all the slaves the user has select. Once its opened there would be a text field were a user can enter ragex to search the render logs in real time. This idea came up when our slaves were stuck requeueing different task on the farm without erroring. The errors would look like this

forums.thinkboxsoftware.com/vie … n+modified

and there was no way of knowing the slave was stuck unless we manually checked each slave or notice the render time being abnormally high.

That makes sense. I tried running popen in my Monitor and I’m faced with the same error you had:

2018-07-31 11:57:14:  Running script popen (C:\DeadlineRepository10\scripts\Jobs\popen.py)
2018-07-31 11:57:14:  PYTHON: Connecting to MyMachine...
2018-07-31 11:57:14:  PYTHON: Disconnecting while waiting for async connection

We might be a little stuck here…

Privacy | Site terms | Cookie preferences