AWS Thinkbox Discussion Forums

Customized slave information in the render log

Is it possible to add more information to be printed out in render log under Slave Information? There are a couple more things my CG sup wanted to see. Which script do I need to modify?

2018-11-18

That information is generic across all job types at the moment. Is there a reason you can’t add the information you need to the job report? Do you have the kind of info you’d like to see there?

Someone else asked for this awhile ago, and I can’t find their use case at the moment.

Hi.

We would like to display the NVidia driver version of that particular machine.

As for being there, it’s just easier for our CG sup to spot workstation setup differences when Redshift produce unexpected result. It sort of makes sense because the GPU model is displayed there. He’ll understand tho if it need to be somewhere else.

How do I add the info to the job report?

On windows based slave you could use parts of this event script and query registry to get that info or store it in slaves extra info. See plugin version in slaves list

Search target would be “NVIDIA Graphics Driver”.

For listing all program uninstall keys in windows registry

import _winreg

try:
    i = 0
    explorer = _winreg.OpenKey(
        _winreg.HKEY_LOCAL_MACHINE,
        'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall'
    )

    while True:
        key = _winreg.EnumKey(explorer, i)
        if "Populate Data" not in key:
            print('Found "{0}" in the list of installed software'.format(key))
        try:
            item = _winreg.OpenKey(explorer, key)
            version, type = _winreg.QueryValueEx(item, 'DisplayName')
            print('- {0}'.format(version))
            _winreg.CloseKey(item)
        except:
            _winreg.CloseKey(item)
            print"No DisplayName key found."
        try:
            item = _winreg.OpenKey(explorer, key)
            version, type = _winreg.QueryValueEx(item, 'DisplayVersion')
            print('- version {0}'.format(version))
            _winreg.CloseKey(item)

            if version not in versions:
                versions.append(version)
        except:
            _winreg.CloseKey(item)
        i += 1

except WindowsError as e:
    print(e) 

Thank you Panze.

So instead of modifying the log, it would be better to implement this as an onJobFinished/onJobFailed event? It would get printed near that section of the log, sounds great.

Yes, that would be one option. You can then read straight from machine registry or query the slaves extrainfo fields for the relevant data.

On a second thought, I actually need this info printed out on a per task basis in order to be able to troubleshoot individual frames. As an event it only triggers at the end so it’s only 1 slave’s info.

What file can I override to get this behavior?

You can have it as slave event.
So to get it once every task you’d want to use “OnSlaveStartingJob” or “OnSlaveRendering”.
https://docs.thinkboxsoftware.com/products/deadline/10.0/1_User%20Manual/manual/event-plugins.html#slave-event-callbacks

1 Like

Yup! Definitely a good way to do it. I’m doing my usual “Option #2” just to round it out.

I can’t remember offhand if those events will inject the output into the current render log or generate an event log though… I also don’t remember when the logging backend is going to come up, but there’s the PreLoad as well that should have the logging ready to go and should be in the task’s job report based on our examples there.

An interesting wrinkle for getting the GPUs is that Deadline only returns the first one it finds, and does so via wmic on Windows (not sure about Linux or macOS there).

Thanks. Never played with those events before, definitely trying them out.

Where would the OnSlaveRendering show up in the log? It doesn’t appear as separate task nor in the render log.

It should appear as a separate log per task in the monitor.
OnSlaveRendering

1 Like
Privacy | Site terms | Cookie preferences