aws_pocketknife 0.1.19 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c79fc407b1a9fbbf0e56bdbc063e87f8d91fd5fb
4
- data.tar.gz: 367f66795712d62ededad96028a7cc4c25e951d1
3
+ metadata.gz: d258157909d39fe8858cac7cd9d33a4234795b66
4
+ data.tar.gz: f7df75d5179007227d0837141884d86055345ead
5
5
  SHA512:
6
- metadata.gz: 23bc162301d9d3bf8b62009cfbaf582da30915d4fcb6225c1fde01092152f955db4035deb5e770a5420caac0c78e2dedc792ef8c9900f09e1670523813aff1d2
7
- data.tar.gz: e1d3d8736766c830cca8783f030a2ef338a2cdd6a565e6577e7537a716ec36b1234ee0dc5fb968392e6060b40225b4d02a6ea15bfa615ee172742c78ccd66543
6
+ metadata.gz: a8c16925a31542dbcdf4f4ae5f22db9581148af11a4bd5d56d4539264a7b83b321cd4e761b2243576db11ef5e4c8e85db6ad70cc7483009c34696691603f3988
7
+ data.tar.gz: 82994427029607c8e2e315556b65b4e05c7cf9e212d51f063af89f164f7cbcbeaa8ccba519ca4f4784e139e6198e5913d903c04ec04c24bbc8ebc96dac045294
@@ -115,7 +115,12 @@ module AwsPocketknife
115
115
  "pending_tasks_count","running_tasks_count", "status",
116
116
  "cpu (units)", "mem (MiB)"
117
117
  ]
118
+ headers_2 = ["total",
119
+ "total pending", "total running",
120
+ "cpu_reserved / cpu_total", "mem_reserved / mem_total"
121
+ ]
118
122
  data = []
123
+ data_2 = []
119
124
  if instances.nil?
120
125
  puts "No instances found"
121
126
  else
@@ -149,13 +154,16 @@ module AwsPocketknife
149
154
  cpu_percentage = (((cpu_cluster_total - cpu_cluster_res_total)/cpu_cluster_total) * 100).round(2)
150
155
  count = count + 1
151
156
  end
152
- data << ["TOTAL (#{count})", "-", "-",
153
- pending_tasks_count_total, running_tasks_count_total, "-",
154
- "#{cpu_cluster_res_total.round(0)} / #{cpu_cluster_total.round(0)} (#{cpu_percentage} %)", "#{mem_cluster_res_total.round(0)} / #{mem_cluster_total.round(0)} (#{mem_percentage} %)"
157
+ data_2 << [count,
158
+ pending_tasks_count_total, running_tasks_count_total,
159
+ "#{(cpu_cluster_total - cpu_cluster_res_total).round(0)} / #{cpu_cluster_total.round(0)} (#{cpu_percentage} %)", "#{(mem_cluster_total - mem_cluster_res_total).round(0)} / #{mem_cluster_total.round(0)} (#{mem_percentage} %)"
155
160
  ]
156
161
  AwsPocketknife::Ecs.pretty_table(headers: headers, data: data)
162
+ puts ""
163
+ puts ""
164
+ AwsPocketknife::Ecs.pretty_table(headers: headers_2, data: data_2)
157
165
  end
158
- end
166
+ end
159
167
  end
160
168
  end
161
169
  end
@@ -1,3 +1,3 @@
1
1
  module AwsPocketknife
2
- VERSION = "0.1.19"
2
+ VERSION = "0.1.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws_pocketknife
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gustavo Soares Souza