linux_proc_mem 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: b711c603c2e49c96540e5c7504e7efc1cb4acf7f
4
- data.tar.gz: 7d865a3cd96dab21f3880c1892f0bcaf7d47d8b8
3
+ metadata.gz: 85db3531d2fe29cb7947ec571fdb1bde8dba9c6f
4
+ data.tar.gz: e7a4bb4eb0b2ed6344d462a5dd6452edcfd26cd4
5
5
  SHA512:
6
- metadata.gz: 669d96f74dee8c55f79e8d757a7eb00b8d214d5c7e624e07cdbf01ee05910caacfc69a666df7b48c4bd65234580877744e9b9f6943d1f7185965dfc107958452
7
- data.tar.gz: 302a8adf2e8fa4a18dbc4f0801df87f80df59aae4133417ab4fa76ab8efee5e3935f570a9466c9b3807f8fad302f54c604ebecead99cf684162584db602b91b2
6
+ metadata.gz: c709ce5f697045f0147b971a2eb4b6b6b6650bc6b070fd81a68cafb027c2fcf44439ebde75921d772f25728da36688ffffc7048222ec3961b3b983bf013dca59
7
+ data.tar.gz: 4bb53deb4f70b28a617bc3240e8a9c8f5e8d6a5f777b3c08ea401240eed7b18866f8484925f379d2307625deff3e15cf14b5016c45c34ae838cb2d36166bec6f
@@ -8,6 +8,8 @@ module LinuxProcMem
8
8
  file = Pathname.new("/proc/#{pid}/smaps")
9
9
  raise "File #{file} not found!" unless File.exists?(file.to_s)
10
10
  GetProcessMem.new.linux_memory(file) + child_pids(pid).inject(0) { |sum, cpid| sum += get_child_bytes(cpid) }
11
+ rescue
12
+ 0.0
11
13
  end
12
14
 
13
15
  def child_pids(pid)
@@ -1,3 +1,3 @@
1
1
  module LinuxProcMem
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linux_proc_mem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Klaus Meyer