Top Level Namespace

Defined Under Namespace

Modules: Viaduct

Instance Method Summary collapse

Instance Method Details

#process_details(p) ⇒ Object



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/viaduct/toolkit/commands/app_status.rb', line 103

def process_details(p)
  if p['host'] && p['lxc_name']
    heading "Host (admin only)"
    field "Host", p['host']
    field "LXC Name", p['lxc_name']
  end

  heading "Networking"
  field "IP Address", p['networking']['ip_address']
  field "MAC Address", p['networking']['mac_address']
  field "Data", "RX: #{p['networking']['rx']}   TX: #{p['networking']['tx']}"

  heading "Timing"
  field "Started", time(p['timing']['started'])
  field "Run time", length_of_time(p['timing']['run_time'])
  field "Last seen", time(p['timing']['last_seen_at'])

  heading "Resources"
  field "Memory", "#{p['resources']['memory_usage'] /1024/1024}MB of #{p['resources']['max_memory']/1024/1024}MB"
  field "CPU Usage", p['resources']['cpu_usage']

  heading "Respawning"
  field "Respawns", "#{p['respawning']['current']} / #{p['respawning']['maximum']}"
  field "Last respawn", time(p['respawning']['last'])

end