diff --git a/OOMAnalyser.html b/OOMAnalyser.html index 318d45d..41fbb63 100644 --- a/OOMAnalyser.html +++ b/OOMAnalyser.html @@ -226,9 +226,10 @@ function goBack() {
The system has physical memory and swap space. That's total. - out of physical - memory and out of swap space - are in use. + + ( out of ) physical + memory and + ( out of ) swap space are in use.
diff --git a/OOMAnalyser.py b/OOMAnalyser.py index 336761a..2edf1cf 100644 --- a/OOMAnalyser.py +++ b/OOMAnalyser.py @@ -641,6 +641,9 @@ class OOMAnalyser(object): # SwapUsed = SwapTotal - SwapFree - SwapCache self.results['swap_used_kb'] = self.results['swap_total_kb'] - self.results['swap_free_kb'] - \ self.results['swap_cache_kb'] + self.results['system_swap_used_percent'] = int(100 * + self.results['swap_total_kb'] / + self.results['swap_used_kb']) def _calc_system_values(self): """Calculate system memory""" @@ -656,6 +659,11 @@ class OOMAnalyser(object): total_rss_pages += self.results['_processes'][pid]['rss_pages'] self.results['system_total_ram_used_kb'] = total_rss_pages * self.results['page_size_kb'] + self.results['system_total_used_percent'] = int(100 * + self.results['system_total_ram_used_kb'] / + self.results['system_total_ram_kb']) + + def _determinate_platform_and_distribution(self): """Determinate platform and distribution""" kernel_version = self.results.get('kernel_version', '')