Class | PhusionPassenger::AdminTools::MemoryStats
In: | lib/phusion_passenger/admin_tools/memory_stats.rb
Parent: | Object

### Methods

apache_processes nginx_processes passenger_processes platform_provides_private_dirty_rss_information? root_privileges_required_for_private_dirty_rss? should_show_private_dirty_rss? sum_memory_usage system_ram_usage

### Classes and Modules

Class PhusionPassenger::AdminTools::MemoryStats::Process

### Public Instance methods

apache_processes()

Returns a list of Apache processes, which may be the empty list if Apache is not running. If the Apache executable name is unknown then nil will be returned.

nginx_processes()

Returns a list of Nginx processes, which may be the empty list if Nginx is not running.

passenger_processes()

Returns a list of Phusion Passenger processes, which may be the empty list if Phusion Passenger is not running.

platform_provides_private_dirty_rss_information?()
root_privileges_required_for_private_dirty_rss?()

Returns whether root privileges are required in order to measure private dirty RSS. Only meaningful if platform_provides_private_dirty_rss_information? returns true.

should_show_private_dirty_rss?()
sum_memory_usage(processes)

Returns the sum of the memory usages of all given processes. Returns a pair [usage, accurate]. `usage` is the summed memory usage in KB, and `accurate` indicates whether this sum is accurate. This may be false if some process‘s memory usage cannot be determined.

system_ram_usage()

Determine the system‘s RAM usage, not including swap. Returns a tuple [total, used] where both numbers are in KB, or nil if the system‘s RAM usage cannot be determined.

[Validate]