Class: PhusionPassenger::AdminTools::MemoryStats::Process
- Defined in:
- lib/phusion_passenger/admin_tools/memory_stats.rb
Overview
Information about a single process.
Instance Attribute Summary collapse
-
#cpu ⇒ Object
Returns the value of attribute cpu.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#ppid ⇒ Object
Returns the value of attribute ppid.
-
#private_dirty_rss ⇒ Object
in KB.
-
#rss ⇒ Object
in KB.
-
#threads ⇒ Object
Returns the value of attribute threads.
-
#vm_size ⇒ Object
in KB.
Instance Method Summary collapse
Instance Attribute Details
#cpu ⇒ Object
Returns the value of attribute cpu.
37 38 39 |
# File 'lib/phusion_passenger/admin_tools/memory_stats.rb', line 37 def cpu @cpu end |
#name ⇒ Object
Returns the value of attribute name.
38 39 40 |
# File 'lib/phusion_passenger/admin_tools/memory_stats.rb', line 38 def name @name end |
#pid ⇒ Object
Returns the value of attribute pid.
32 33 34 |
# File 'lib/phusion_passenger/admin_tools/memory_stats.rb', line 32 def pid @pid end |
#ppid ⇒ Object
Returns the value of attribute ppid.
33 34 35 |
# File 'lib/phusion_passenger/admin_tools/memory_stats.rb', line 33 def ppid @ppid end |
#private_dirty_rss ⇒ Object
in KB
39 40 41 |
# File 'lib/phusion_passenger/admin_tools/memory_stats.rb', line 39 def private_dirty_rss @private_dirty_rss end |
#rss ⇒ Object
in KB
36 37 38 |
# File 'lib/phusion_passenger/admin_tools/memory_stats.rb', line 36 def rss @rss end |
#threads ⇒ Object
Returns the value of attribute threads.
34 35 36 |
# File 'lib/phusion_passenger/admin_tools/memory_stats.rb', line 34 def threads @threads end |
#vm_size ⇒ Object
in KB
35 36 37 |
# File 'lib/phusion_passenger/admin_tools/memory_stats.rb', line 35 def vm_size @vm_size end |
Instance Method Details
#private_dirty_rss_in_mb ⇒ Object
49 50 51 52 53 54 55 |
# File 'lib/phusion_passenger/admin_tools/memory_stats.rb', line 49 def private_dirty_rss_in_mb if private_dirty_rss.is_a?(Numeric) return sprintf("%.1f MB", private_dirty_rss / 1024.0) else return "?" end end |
#rss_in_mb ⇒ Object
45 46 47 |
# File 'lib/phusion_passenger/admin_tools/memory_stats.rb', line 45 def rss_in_mb return sprintf("%.1f MB", rss / 1024.0) end |
#to_a ⇒ Object
57 58 59 |
# File 'lib/phusion_passenger/admin_tools/memory_stats.rb', line 57 def to_a return [pid, ppid, vm_size_in_mb, private_dirty_rss_in_mb, rss_in_mb, name] end |
#vm_size_in_mb ⇒ Object
41 42 43 |
# File 'lib/phusion_passenger/admin_tools/memory_stats.rb', line 41 def vm_size_in_mb return sprintf("%.1f MB", vm_size / 1024.0) end |