- Python 100%
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| rp_hangcheck.py | ||
| rpBackup.py | ||
renderPal-tools
Two small command-line utilities for a RenderPal V2 render farm,
built for a student film pipeline. Both talk to the RenderPal server through its command-line
client RpRcCmd.exe and parse the XML it returns.
| Script | Purpose |
|---|---|
rpBackup.py |
Dump the entire RenderPal database (jobs, chunks, clients, pools, stats) to dated XML + CSV files, so your render history survives deleting jobs from the server. |
rp_hangcheck.py |
Detect render chunks that are "hung" (running far longer than normal) and optionally restart them automatically, with safety guards. |
Requirements
- Windows
- RenderPal V2 with the command-line client
RpRcCmd.exe - Python 3.10+ (uses modern type hints)
Configuration
Both scripts have a small configuration block near the top. The important ones:
RPRCCMD_PATH— path toRpRcCmd.exe(defaults to the standard install location).RP_SERVER/RP_LOGIN— leave empty to reuse the credentials from your localRpRcCmd.conf(recommended). Only set them explicitly if you must, e.g.RP_LOGIN = "user:password". ⚠️ Don't commit real credentials.
rpBackup.py
Dumps everything the server currently knows into BACKUP_ROOT\<date>\:
jobs.xml raw net job dump
chunks\chunks_001.xml raw chunk dumps, batched
clients.xml raw client dump (best effort)
pools.xml raw pool+clients (best effort)
statistics.xml raw server statistics(best effort)
jobs.csv one row per job
chunks.csv one row per chunk
backup_report.txt what succeeded / failed
The raw XML keeps full fidelity; the CSVs are flattened for easy statistics later.
py rpBackup.py
Set BACKUP_ROOT to where you want the dated folders written.
rp_hangcheck.py
Finds rendering jobs and, within each, flags any running chunk whose elapsed time exceeds the
longest finished chunk's time × HANG_MULTIPLIER. By default it is a dry run — it only
prints what it would restart. Pass --arm to actually restart.
py rp_hangcheck.py # all rendering jobs, dry run
py rp_hangcheck.py 7149 # one job, dry run
py rp_hangcheck.py --arm # all rendering jobs, REAL restarts
py rp_hangcheck.py 7149 --arm # one job, REAL restarts
Safety guards (all tunable in the config block)
MIN_FINISHED_CHUNKS— only analyze a job once this many chunks are finished (needs a baseline before it can judge "too long").HANG_MULTIPLIER— how much longer than the longest finished chunk counts as hung.MAX_RESTARTS_PER_RUN— hard cap so a bad threshold can't restart the whole farm at once.MAX_ATTEMPTS_BEFORE_GIVEUP— stop retrying a genuinely broken frame.REQUIRE_LOW_CPU/LOW_CPU_THRESHOLD— optional extra filter for the "CPU ~0" hang pattern.
Every real restart (and every skip/error) is written to LOG_FILE.
How it was used in practice
A Windows Task Scheduler job ran rp_hangcheck.py --arm every 5 minutes, so hung chunks were
picked up and restarted automatically without anyone watching the farm.
It is reliable, but note a design limitation: it can take a while before a hung chunk is
actually detected. The detection rule needs a baseline (MIN_FINISHED_CHUNKS finished chunks)
and compares against the longest finished chunk × HANG_MULTIPLIER, so a chunk has to run
quite a bit longer than the slowest normal one before it trips. That's inherent to how the
check is designed and could be improved (e.g. per-frame time estimates instead of a single
job-wide threshold).
Bonus idea
rpBackup.py was also written with a second purpose in mind: keeping the full job/chunk
history around so the project could be analyzed afterwards — render times, slowest shots,
busiest clients, total CPU hours, etc. Could make for some fun statistics once a production
wraps.