bipbip 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bipbip/plugin/network.rb +5 -2
- data/lib/bipbip/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: 0dddc26953a67802ee6093893f0e97dd68e74d51
|
4
|
+
data.tar.gz: e89421a5c593613ac75969a5f600aa4d419ad77c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9916e81ad68c2592a09f0ed051bdb622005409a9ec8f5b86bcce916625388df7a3a85e1ccbdfb8a80fbb25637ca07db18954ae9cf74afe2f979cd23db5e1a80
|
7
|
+
data.tar.gz: 54f0019b468297488d327487acf90276c4d5acace60b3c0524f1a76a5443ca31f5c8961d00dd8f5258f0576d5c8c98db0e0c2d3da0442e04a80586d91f3779a3
|
@@ -9,8 +9,11 @@ module Bipbip
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def monitor
|
12
|
-
|
13
|
-
|
12
|
+
tcp_summary = `ss -s | grep '^TCP:'`
|
13
|
+
tcp_counters = /^TCP:\s+(\d+) \(estab (\d+), closed (\d+), orphaned (\d+), synrecv (\d+), timewait (\d+)\/(\d+)\), ports (\d+)$/.match(tcp_summary)
|
14
|
+
raise "Cannot match ss-output `#{tcp_summary}`" unless tcp_counters
|
15
|
+
|
16
|
+
{:connections_total => tcp_counters[1].to_i}
|
14
17
|
end
|
15
18
|
end
|
16
19
|
end
|
data/lib/bipbip/version.rb
CHANGED