How can I access log output in a script? I want to run a job script over the output of all tasks of completed jobs to scrape statistics, but I can’t find anything relevant in either the scripting documentation or in any examples…
Leo
How can I access log output in a script? I want to run a job script over the output of all tasks of completed jobs to scrape statistics, but I can’t find anything relevant in either the scripting documentation or in any examples…
Leo
Hi Leo,
There really isn’t a direct way to access this information. We’re thinking that we need to expose more Slave information to the script API, such as current render time, current render log, etc. If there is any other information you would like to get using scripts, please let us know, and we can add them to a future release.
Cheers,
My apologies for not following up sooner! I ended up getting list of jobs and then just executing deadlinecommand to get the log file paths:
ScriptUtils.ExecuteCommandAndGetOutput( S2SC('GetReportFilenames','JobLog',jobId))
There’s no Slave Information API that would help, I was looking for various Maya-specific output lines, so I needed the raw log data (specifically I was parsing the “memory used” output lines to accumulate a maximum memory profile per-job and per-slave). This is an infrequent, ex-post-facto analysis script, so I don’t want to integrate it into the MayaCmd plugin or anything.
Oh, and relevant to the above code fragment, S2SC is just a helper to convert from Python tuple to .NET StringCollection. Is there a way to write that as a literal in Iron Python?
Not that we know of. When we use ExecuteCommandAndGetOutput, we just build up a .NET StringCollection as well.
Cheers,