class PhusionPassenger::AdminTools::ServerInstance::Process
Constants
- BOOL_PROPERTIES
- INT_PROPERTIES
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)
click to toggle source
# File lib/phusion_passenger/admin_tools/server_instance.rb, line 79 def initialize(group) @group = group @server_sockets = {} end
Public Instance Methods
connect(socket_name = :main)
click to toggle source
# File lib/phusion_passenger/admin_tools/server_instance.rb, line 84 def connect(socket_name = :main) socket_info = @server_sockets[socket_name] if !socket_info raise "This process has no server socket named '#{socket_name}'." end return Utils.connect_to_server(socket_info.address) if socket_info.address_type == 'unix' return UNIXSocket.new(socket_info.address) else host, port = socket_info.address.split(':', 2) return TCPSocket.new(host, port.to_i) end end
has_metrics?()
click to toggle source
# File lib/phusion_passenger/admin_tools/server_instance.rb, line 98 def has_metrics? return @has_metrics end