I'm working on a script that runs a shell command that may occassionally run awry and generate huge amounts of looping data. What I'm trying to figure out is how to monitor the size of the data generated and kill the process if it hits above x
The problem is that this command doesn't feed back the data as it generates it, but waits until the end and sends it all back in a hash. So I'm taking a look at Proc::ProcessTable::Process. It has a command size which returns the process' virtual memory in bytes.
Is this what I need? I'm not all that knowledgable with the inner workings of these machines. There's another command called rss which returns the resident set size, but I have no idea what that is, and the virtual memory command seems to be more likely the right choice.