in reply to How to limit resources ?

On *nix you can parse the output of ps, or somebody may have an xs interface to a 'top' lib. Can you do something with this?

$ perl -e 'print `ps -l p $$`,$/' F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME C +MD 000 S 501 5150 561 0 69 0 - 614 pipe_w pts/2 0:00 p +erl -e pri
The ps command has a terrific variety of options for the information and format returned. You can throttle CPU by sleeping, memory footprint will be trickier.

After Compline,
Zaxo