in reply to fork and exec a codeblock

Thanks Aristotle for demonstrating that. I guess my original idea was to to try and separate the monitoring code from the monitored code.

It seems now that it is preferrable to have the script in a separate file. rather than a code block, because when watching it with ps or top, the forked codeblock is almost 9 meg in size, whereas the forked separate file is only around 4 meg. Maybe it's getting the xterm in there with it?

Although it is non-Perl, I discovered that the assembly sh, grep,watch,and cat from the asmutils collection at asmutils will monitor it extremely efficiently with:

#!./sh ./watch ./cat /proc/$pid/status | ./grep VmSize
and it uses only 40k (including the shell) !!! Yikes....I'm getting interested in Inline::Asm again.

Now I'm searching for a way to display the asm output to a nice screen box, directly without Tk. :-)


I'm not really a human, but I play one on earth. flash japh