aws_pocketknife 0.1.19 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws_pocketknife/cli/ecs.rb +12 -4
- data/lib/aws_pocketknife/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d258157909d39fe8858cac7cd9d33a4234795b66
|
4
|
+
data.tar.gz: f7df75d5179007227d0837141884d86055345ead
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|