Skip to content

Commit 010ea17

Browse files
committed
Fix Linux memory usage capture.
1 parent 903607d commit 010ea17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/process/metrics/memory/linux.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ def self.supported?
3636
end
3737

3838
# Capture memory usage for the given process IDs.
39-
def self.capture(pids)
39+
def self.capture(pid, **options)
4040
usage = Memory.zero
4141

42-
pids.each do |pid|
42+
begin
4343
File.foreach("/proc/#{pid}/smaps_rollup") do |line|
4444
if /(?<name>.*?):\s+(?<value>\d+) kB/ =~ line
4545
if key = SMAP[name]

0 commit comments

Comments
 (0)