Detect OS information
(self)
| 215 | for line in f: |
| 216 | if line.startswith('MemTotal:'): |
| 217 | # Value is in kB |
| 218 | kb = int(line.split()[1]) |
| 219 | self.capabilities.total_ram_gb = kb / (1024 ** 2) |
| 220 | elif line.startswith('MemAvailable:'): |
| 221 | kb = int(line.split()[1]) |
| 222 | self.capabilities.available_ram_gb = kb / (1024 ** 2) |
| 223 | except Exception as e: |
| 224 | logger.warning(f"Could not read /proc/meminfo: {e}") |
| 225 |
no test coverage detected