36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/eye/process/data.rb', line 36
def self_status_data(opts)
h = { name: name,
state: state,
type: (self.class == Eye::ChildProcess ? :child_process : :process),
resources: Eye::SystemResources.resources(pid) }
if @states_history
h[:state_changed_at] = @states_history.last_state_changed_at.to_i
h[:state_reason] = @states_history.last_reason.to_s
end
h[:debug] = debug_data if opts[:debug]
h[:procline] = Eye::SystemResources.args(self.pid) if opts[:procline]
h[:current_command] = scheduler_current_command if scheduler_current_command
h
end
|