int sutil.getMemoryUsage ( ) (enterprise edition only)


Get memory usage of screen-scraper.


This method does not receive any parameters.

Return Values

Returns the average percentage of memory used by screen-scraper over the past 30 seconds, as an integer.

Change Log

Version Description
5.0 Moved from session to sutil.
4.5 Available for enterprise edition.

For tips on optimizing screen-scraper's memory usage so that it can run faster, see our FAQ on optimization.


Stop Scrape on Memory Leak

 // Stop scrape if memory is low
 if( sutil.getMemoryUsage() > 98 )
     session.log( "Memory is critically low. Stopping the scraping session." );