mission_control-servers 0.0.5 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62b52f6f353c4df8112c4a98571d3d948d981bd02cde2fefd923b71843020eb5
|
4
|
+
data.tar.gz: 0d7fbd14a9d2dddfaf373a712fdd8c830c7e0745ebd8772f3e0b8ea384b1952e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b03c3e10110f81db19c3e753a0ee8a7bfd0949a06db41ae31b809502cbcbc4ba32160c24df3af010ef04bb2f4d9f2c2d069bceea617b2097028c77311e4b984
|
7
|
+
data.tar.gz: cae2925b7f4913e7bec9462a58eb1c83f2f32b5bfd5661384d0ce94ba8323bddba8636c7de86b891c66425ee592f5e6b95d59a71a3bd3d0cb25e0ea7c2325df0
|
data/README.md
CHANGED
@@ -22,15 +22,10 @@ module MissionControl::Servers
|
|
22
22
|
#!/bin/bash
|
23
23
|
|
24
24
|
endpoint="#{project_ingress_url(@project.token)}"
|
25
|
-
cpu_usage=$(
|
26
|
-
top -bn1 | \
|
27
|
-
grep "Cpu(s)" | \
|
28
|
-
sed "s/.*, *\\([0-9.]*\\)%* id.*/\\1/" | \
|
29
|
-
awk '{print 100 - $1}'
|
30
|
-
)
|
25
|
+
cpu_usage=$(vmstat 1 5 | awk 'NR==4 {print 100 - $15}')
|
31
26
|
mem_used=$(free -m | awk '/^Mem:/ {print $3}')
|
32
27
|
mem_free=$(free -m | awk '/^Mem:/ {print $7}')
|
33
|
-
disk_free=$(df -h | awk '
|
28
|
+
disk_free=$(df -h | awk 'NF=="/"{print $4}')
|
34
29
|
hostname=$(hostname)
|
35
30
|
|
36
31
|
data="service[cpu]=$cpu_usage"
|