Class | PhusionPassenger::AdminTools::ServerInstance::Process
In: | lib/phusion_passenger/admin_tools/server_instance.rb
Parent: | Object

### Methods

connect has_metrics? new

### Constants

INT_PROPERTIES | = | [:pid, :sessions, :processed, :cpu, :rss, :real_memory, :vmsize, :process_group_id]
BOOL_PROPERTIES | = | [:has_metrics]

### Attributes

command | [RW] |
connect_password | [RW] |
cpu | [RW] |
group | [R] |
gupid | [RW] |
has_metrics | [RW] |
pid | [RW] |
process_group_id | [RW] |
processed | [RW] |
real_memory | [RW] |
rss | [RW] |
server_sockets | [RW] |
sessions | [RW] |
uptime | [RW] |
vmsize | [RW] |

### Public Class methods

new(group)

[Source]

        # File lib/phusion_passenger/admin_tools/server_instance.rb, line 82
    82:                 def initialize(group)
    83:                         @group = group
    84:                         @server_sockets = {}
    85:                 end

### Public Instance methods

connect(socket_name = :main)

[Source]

        # File lib/phusion_passenger/admin_tools/server_instance.rb, line 87
    87:                 def connect(socket_name = :main)
    88:                         socket_info = @server_sockets[socket_name]
    89:                         if !socket_info
    90:                                 raise "This process has no server socket named '#{socket_name}'."
    91:                         end
    92:                         if socket_info.address_type == 'unix'
    93:                                 return UNIXSocket.new(socket_info.address)
    94:                         else
    95:                                 host, port = socket_info.address.split(':', 2)
    96:                                 return TCPSocket.new(host, port.to_i)
    97:                         end
    98:                 end

has_metrics?()

[Source]

         # File lib/phusion_passenger/admin_tools/server_instance.rb, line 100
    100:                 def has_metrics?
    101:                         return @has_metrics
    102:                 end

[Validate]