memory management - Watching Other Applications With Ruby -


i wondering if possible ruby watch other applications , if application below memory threshold kills , starts again.

operating system windows 7+

things need able do:

  1. monitor memory
  2. determine between different processes
  3. kill processes
  4. start new process (bat script or powershell)
  5. start monitoring again

the watched application running run high memory when working , good. if goes below 1gb want application kill it. of course when restarts give grace period load ram.

i going use shoes gui framework make nice wrap around it. theoretically nice have sort of auto detection if application running.

if possible, requires gem think may hear them.

i found usagewatch gem seems headed right way, glance @ documentation general , need specific process watching.

if question not appropriate here please let me know via comment , remove and/or move proper place type of question asked.

i appreciate time , effort helping me endeavor.

thank you

i suggest using win32 gem. start looking through win32 api documentation. give flexible solution , give whole system programming power windows. advice make wrapper functions things connected windows need , use them way, if find more appriete solution can switch easily.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -