Method: NewRelic::Agent::SystemInfo.ram_in_mib
- Defined in:
- lib/new_relic/agent/system_info.rb
permalink .ram_in_mib ⇒ Object
301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/new_relic/agent/system_info.rb', line 301 def self.ram_in_mib if darwin? (sysctl_value('hw.memsize') / (1024**2)) elsif linux? meminfo = proc_try_read('/proc/meminfo') parse_linux_meminfo_in_mib(meminfo) elsif bsd? (sysctl_value('hw.realmem') / (1024**2)) else ::NewRelic::Agent.logger.debug("Unable to determine ram_in_mib for host os: #{ruby_os_identifier}") nil end end |