get_process_mem-1-8-7 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/.travis.yml +16 -0
- data/CHANGELOG.md +20 -0
- data/Gemfile +3 -0
- data/README.md +62 -0
- data/Rakefile +15 -0
- data/get_process_mem.gemspec +22 -0
- data/lib/get_process_mem.rb +78 -0
- data/lib/get_process_mem/version.rb +3 -0
- data/test/fixtures/heroku-bash-smap +912 -0
- data/test/get_process_mem_test.rb +47 -0
- data/test/test_helper.rb +10 -0
- metadata +95 -0
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
## 0.3.1
|
2
|
+
|
3
|
+
Add Ruby 1.8.7 Support (needed for CentOS6)
|
4
|
+
|
5
|
+
## 0.2.1
|
6
|
+
|
7
|
+
- Reverting back to RSS for linux until (#7) is resolved
|
8
|
+
|
9
|
+
## 0.1.1
|
10
|
+
|
11
|
+
- Bugfix: the `ps` style of memory reporting should always use RSS, and Linux should always use PSS
|
12
|
+
|
13
|
+
## 0.1.0
|
14
|
+
|
15
|
+
- Default to using PSS for linux (#2 & #3) @ksoderstrom
|
16
|
+
- Correct for bit shifting truncation (#4) @ksoderstrom
|
17
|
+
|
18
|
+
## 0.0.1
|
19
|
+
|
20
|
+
- Initial
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# Get Process Memory for Ruby 1.8.7
|
2
|
+
|
3
|
+
[![Build Status](https://travis-ci.org/worldline/get_process_mem.png?branch=master)](https://travis-ci.org/worldline/get_process_mem)
|
4
|
+
|
5
|
+
Do you need to get the memory usage of a process? Great because this library does that.
|
6
|
+
|
7
|
+
## Install
|
8
|
+
|
9
|
+
In your `Gemfile` add
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'get_process_mem-1-8-7'
|
13
|
+
```
|
14
|
+
|
15
|
+
then run `$ bundle install`
|
16
|
+
|
17
|
+
|
18
|
+
## Use It
|
19
|
+
|
20
|
+
Get the current process memory usage:
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
puts mem = GetProcessMem.new.inspect
|
24
|
+
#<GetProcessMem @mb=24.28125 @gb=0.023712158203125 @kb=24864.0 @bytes=25460736 >
|
25
|
+
mem.bytes # => 25460736
|
26
|
+
mem.kb # => 24864.0
|
27
|
+
mem.mb # => 24.28125
|
28
|
+
mem.gb # => 0.023712158203125
|
29
|
+
```
|
30
|
+
|
31
|
+
Note: All numeric values returned as a float except bytes which is an integer.
|
32
|
+
|
33
|
+
Get memory usage of another process:
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
`echo 'nothing to see here' > tmplogf`
|
37
|
+
pid = Process.spawn('tail -f tmplog')
|
38
|
+
mem = GetProcessMem.new(pid)
|
39
|
+
puts mem.inspect
|
40
|
+
# => #<GetProcessMem @mb=0.48828125 @gb=0.000476837158203125 @kb=500.0 @bytes=512000 >
|
41
|
+
|
42
|
+
Process.kill('TERM', pid)
|
43
|
+
Process.wait(pid)
|
44
|
+
|
45
|
+
mem.inspect
|
46
|
+
# => "#<GetProcessMem @mb=0.0 @gb=0.0 @kb=0.0 @bytes=0>"
|
47
|
+
`rm tmplog`
|
48
|
+
```
|
49
|
+
|
50
|
+
On Linux, which provides `/proc/<pid>/smaps`, the default memory type returned is PSS, or "proportional set size", where shared memory is divided by the number of processes sharing it. On other platforms, the size returned is the RSS or the [Resident Set Size](http://en.wikipedia.org/wiki/Resident_set_size), basically how much memory the program takes up in RAM at the time, including all the shared memory.
|
51
|
+
|
52
|
+
The memory type can be specified by passing an options hash:
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
GetProcessMem.new(Process.pid, mem_type: 'rss')
|
56
|
+
```
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
## License
|
61
|
+
|
62
|
+
MIT
|
data/Rakefile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
|
5
|
+
require 'rake'
|
6
|
+
require 'rake/testtask'
|
7
|
+
|
8
|
+
task :default => [:test]
|
9
|
+
|
10
|
+
test_task = Rake::TestTask.new(:test) do |t|
|
11
|
+
t.libs << 'lib'
|
12
|
+
t.libs << 'test'
|
13
|
+
t.pattern = 'test/**/*_test.rb'
|
14
|
+
t.verbose = false
|
15
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'get_process_mem/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "get_process_mem-1-8-7"
|
8
|
+
gem.version = GetProcessMem::VERSION
|
9
|
+
gem.authors = ["Romain Philibert"]
|
10
|
+
gem.email = ["Filirom1@gmail.com"]
|
11
|
+
gem.description = %q{ Get memory usage of a process in Ruby }
|
12
|
+
gem.summary = %q{ Use GetProcessMem to find out the amount of RAM used by any process }
|
13
|
+
gem.homepage = "https://github.com/worldline/get_process_mem"
|
14
|
+
gem.license = "MIT"
|
15
|
+
|
16
|
+
gem.files = `git ls-files`.split($/)
|
17
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
|
+
gem.require_paths = ["lib"]
|
20
|
+
|
21
|
+
gem.add_development_dependency "rake", "~> 10.1"
|
22
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
require 'bigdecimal'
|
3
|
+
|
4
|
+
|
5
|
+
# Cribbed from Unicorn Worker Killer, thanks!
|
6
|
+
class GetProcessMem
|
7
|
+
KB_TO_BYTE = 1024 # 2**10 = 1024
|
8
|
+
MB_TO_BYTE = 1_048_576 # 1024**2 = 1_048_576
|
9
|
+
GB_TO_BYTE = 1_073_741_824 # 1024**3 = 1_073_741_824
|
10
|
+
CONVERSION = { "kb" => KB_TO_BYTE, "mb" => MB_TO_BYTE, "gb" => GB_TO_BYTE }
|
11
|
+
ROUND_UP = BigDecimal.new("0.5")
|
12
|
+
attr_reader :pid
|
13
|
+
|
14
|
+
def initialize(pid = Process.pid)
|
15
|
+
@process_file = Pathname.new "/proc/#{pid}/smaps"
|
16
|
+
@pid = pid
|
17
|
+
@linux = @process_file.exist?
|
18
|
+
end
|
19
|
+
|
20
|
+
def linux?
|
21
|
+
@linux
|
22
|
+
end
|
23
|
+
|
24
|
+
def bytes
|
25
|
+
memory = linux_memory if linux?
|
26
|
+
memory ||= ps_memory
|
27
|
+
end
|
28
|
+
|
29
|
+
def kb(b = bytes)
|
30
|
+
(b/BigDecimal.new(KB_TO_BYTE.to_s)).to_f
|
31
|
+
end
|
32
|
+
|
33
|
+
def mb(b = bytes)
|
34
|
+
(b/BigDecimal.new(MB_TO_BYTE.to_s)).to_f
|
35
|
+
end
|
36
|
+
|
37
|
+
def gb(b = bytes)
|
38
|
+
(b/BigDecimal.new(GB_TO_BYTE.to_s)).to_f
|
39
|
+
end
|
40
|
+
|
41
|
+
def inspect
|
42
|
+
b = bytes
|
43
|
+
"#<#{self.class}:0x%08x @mb=#{ mb b } @gb=#{ gb b } @kb=#{ kb b } @bytes=#{b}>" % (object_id * 2)
|
44
|
+
end
|
45
|
+
|
46
|
+
def mem_type
|
47
|
+
@mem_type
|
48
|
+
end
|
49
|
+
|
50
|
+
def mem_type=(mem_type)
|
51
|
+
@mem_type = mem_type.downcase
|
52
|
+
end
|
53
|
+
|
54
|
+
# linux stores memory info in a file "/proc/#{pid}/smaps"
|
55
|
+
# If it's available it uses less resources than shelling out to ps
|
56
|
+
def linux_memory(file = @process_file)
|
57
|
+
lines = file.each_line.select {|line| line.match /^Rss/ }
|
58
|
+
return if lines.empty?
|
59
|
+
lines.reduce(0) do |sum, line|
|
60
|
+
m = line.match(/(\d*\.{0,1}\d+)\s+(\w\w)/)
|
61
|
+
next unless m
|
62
|
+
value = BigDecimal.new(m[1]) + ROUND_UP
|
63
|
+
unit = m[2].downcase
|
64
|
+
sum += CONVERSION[unit] * value
|
65
|
+
sum
|
66
|
+
end
|
67
|
+
rescue Errno::EACCES
|
68
|
+
0
|
69
|
+
end
|
70
|
+
|
71
|
+
private
|
72
|
+
|
73
|
+
# Pull memory from `ps` command, takes more resources and can freeze
|
74
|
+
# in low memory situations
|
75
|
+
def ps_memory
|
76
|
+
KB_TO_BYTE * BigDecimal.new(`ps -o rss= -p #{pid}`)
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,912 @@
|
|
1
|
+
00400000-004db000 r-xp 00000000 07:01 72877 /bin/bash
|
2
|
+
Size: 876 kB
|
3
|
+
Rss: 532 kB
|
4
|
+
Pss: 532 kB
|
5
|
+
Shared_Clean: 0 kB
|
6
|
+
Shared_Dirty: 0 kB
|
7
|
+
Private_Clean: 532 kB
|
8
|
+
Private_Dirty: 0 kB
|
9
|
+
Referenced: 532 kB
|
10
|
+
Anonymous: 0 kB
|
11
|
+
AnonHugePages: 0 kB
|
12
|
+
Swap: 0 kB
|
13
|
+
KernelPageSize: 4 kB
|
14
|
+
MMUPageSize: 4 kB
|
15
|
+
Locked: 0 kB
|
16
|
+
VmFlags: rd ex mr mw me dw
|
17
|
+
006da000-006db000 r--p 000da000 07:01 72877 /bin/bash
|
18
|
+
Size: 4 kB
|
19
|
+
Rss: 4 kB
|
20
|
+
Pss: 4 kB
|
21
|
+
Shared_Clean: 0 kB
|
22
|
+
Shared_Dirty: 0 kB
|
23
|
+
Private_Clean: 0 kB
|
24
|
+
Private_Dirty: 4 kB
|
25
|
+
Referenced: 4 kB
|
26
|
+
Anonymous: 4 kB
|
27
|
+
AnonHugePages: 0 kB
|
28
|
+
Swap: 0 kB
|
29
|
+
KernelPageSize: 4 kB
|
30
|
+
MMUPageSize: 4 kB
|
31
|
+
Locked: 0 kB
|
32
|
+
VmFlags: rd mr mw me dw ac
|
33
|
+
006db000-006e4000 rw-p 000db000 07:01 72877 /bin/bash
|
34
|
+
Size: 36 kB
|
35
|
+
Rss: 36 kB
|
36
|
+
Pss: 36 kB
|
37
|
+
Shared_Clean: 0 kB
|
38
|
+
Shared_Dirty: 0 kB
|
39
|
+
Private_Clean: 0 kB
|
40
|
+
Private_Dirty: 36 kB
|
41
|
+
Referenced: 36 kB
|
42
|
+
Anonymous: 36 kB
|
43
|
+
AnonHugePages: 0 kB
|
44
|
+
Swap: 0 kB
|
45
|
+
KernelPageSize: 4 kB
|
46
|
+
MMUPageSize: 4 kB
|
47
|
+
Locked: 0 kB
|
48
|
+
VmFlags: rd wr mr mw me dw ac
|
49
|
+
006e4000-006ea000 rw-p 00000000 00:00 0
|
50
|
+
Size: 24 kB
|
51
|
+
Rss: 24 kB
|
52
|
+
Pss: 24 kB
|
53
|
+
Shared_Clean: 0 kB
|
54
|
+
Shared_Dirty: 0 kB
|
55
|
+
Private_Clean: 0 kB
|
56
|
+
Private_Dirty: 24 kB
|
57
|
+
Referenced: 24 kB
|
58
|
+
Anonymous: 24 kB
|
59
|
+
AnonHugePages: 0 kB
|
60
|
+
Swap: 0 kB
|
61
|
+
KernelPageSize: 4 kB
|
62
|
+
MMUPageSize: 4 kB
|
63
|
+
Locked: 0 kB
|
64
|
+
VmFlags: rd wr mr mw me ac
|
65
|
+
020c0000-0210e000 rw-p 00000000 00:00 0 [heap]
|
66
|
+
Size: 312 kB
|
67
|
+
Rss: 312 kB
|
68
|
+
Pss: 312 kB
|
69
|
+
Shared_Clean: 0 kB
|
70
|
+
Shared_Dirty: 0 kB
|
71
|
+
Private_Clean: 0 kB
|
72
|
+
Private_Dirty: 312 kB
|
73
|
+
Referenced: 312 kB
|
74
|
+
Anonymous: 312 kB
|
75
|
+
AnonHugePages: 0 kB
|
76
|
+
Swap: 0 kB
|
77
|
+
KernelPageSize: 4 kB
|
78
|
+
MMUPageSize: 4 kB
|
79
|
+
Locked: 0 kB
|
80
|
+
VmFlags: rd wr mr mw me ac
|
81
|
+
7f28ff505000-7f28ff511000 r-xp 00000000 07:01 81120 /lib/libnss_files-2.11.1.so
|
82
|
+
Size: 48 kB
|
83
|
+
Rss: 16 kB
|
84
|
+
Pss: 0 kB
|
85
|
+
Shared_Clean: 16 kB
|
86
|
+
Shared_Dirty: 0 kB
|
87
|
+
Private_Clean: 0 kB
|
88
|
+
Private_Dirty: 0 kB
|
89
|
+
Referenced: 16 kB
|
90
|
+
Anonymous: 0 kB
|
91
|
+
AnonHugePages: 0 kB
|
92
|
+
Swap: 0 kB
|
93
|
+
KernelPageSize: 4 kB
|
94
|
+
MMUPageSize: 4 kB
|
95
|
+
Locked: 0 kB
|
96
|
+
VmFlags: rd ex mr mw me
|
97
|
+
7f28ff511000-7f28ff710000 ---p 0000c000 07:01 81120 /lib/libnss_files-2.11.1.so
|
98
|
+
Size: 2044 kB
|
99
|
+
Rss: 0 kB
|
100
|
+
Pss: 0 kB
|
101
|
+
Shared_Clean: 0 kB
|
102
|
+
Shared_Dirty: 0 kB
|
103
|
+
Private_Clean: 0 kB
|
104
|
+
Private_Dirty: 0 kB
|
105
|
+
Referenced: 0 kB
|
106
|
+
Anonymous: 0 kB
|
107
|
+
AnonHugePages: 0 kB
|
108
|
+
Swap: 0 kB
|
109
|
+
KernelPageSize: 4 kB
|
110
|
+
MMUPageSize: 4 kB
|
111
|
+
Locked: 0 kB
|
112
|
+
VmFlags: mr mw me
|
113
|
+
7f28ff710000-7f28ff711000 r--p 0000b000 07:01 81120 /lib/libnss_files-2.11.1.so
|
114
|
+
Size: 4 kB
|
115
|
+
Rss: 4 kB
|
116
|
+
Pss: 4 kB
|
117
|
+
Shared_Clean: 0 kB
|
118
|
+
Shared_Dirty: 0 kB
|
119
|
+
Private_Clean: 0 kB
|
120
|
+
Private_Dirty: 4 kB
|
121
|
+
Referenced: 4 kB
|
122
|
+
Anonymous: 4 kB
|
123
|
+
AnonHugePages: 0 kB
|
124
|
+
Swap: 0 kB
|
125
|
+
KernelPageSize: 4 kB
|
126
|
+
MMUPageSize: 4 kB
|
127
|
+
Locked: 0 kB
|
128
|
+
VmFlags: rd mr mw me ac
|
129
|
+
7f28ff711000-7f28ff712000 rw-p 0000c000 07:01 81120 /lib/libnss_files-2.11.1.so
|
130
|
+
Size: 4 kB
|
131
|
+
Rss: 4 kB
|
132
|
+
Pss: 4 kB
|
133
|
+
Shared_Clean: 0 kB
|
134
|
+
Shared_Dirty: 0 kB
|
135
|
+
Private_Clean: 0 kB
|
136
|
+
Private_Dirty: 4 kB
|
137
|
+
Referenced: 4 kB
|
138
|
+
Anonymous: 4 kB
|
139
|
+
AnonHugePages: 0 kB
|
140
|
+
Swap: 0 kB
|
141
|
+
KernelPageSize: 4 kB
|
142
|
+
MMUPageSize: 4 kB
|
143
|
+
Locked: 0 kB
|
144
|
+
VmFlags: rd wr mr mw me ac
|
145
|
+
7f28ff712000-7f28ff71c000 r-xp 00000000 07:01 81122 /lib/libnss_nis-2.11.1.so
|
146
|
+
Size: 40 kB
|
147
|
+
Rss: 20 kB
|
148
|
+
Pss: 0 kB
|
149
|
+
Shared_Clean: 20 kB
|
150
|
+
Shared_Dirty: 0 kB
|
151
|
+
Private_Clean: 0 kB
|
152
|
+
Private_Dirty: 0 kB
|
153
|
+
Referenced: 20 kB
|
154
|
+
Anonymous: 0 kB
|
155
|
+
AnonHugePages: 0 kB
|
156
|
+
Swap: 0 kB
|
157
|
+
KernelPageSize: 4 kB
|
158
|
+
MMUPageSize: 4 kB
|
159
|
+
Locked: 0 kB
|
160
|
+
VmFlags: rd ex mr mw me
|
161
|
+
7f28ff71c000-7f28ff91b000 ---p 0000a000 07:01 81122 /lib/libnss_nis-2.11.1.so
|
162
|
+
Size: 2044 kB
|
163
|
+
Rss: 0 kB
|
164
|
+
Pss: 0 kB
|
165
|
+
Shared_Clean: 0 kB
|
166
|
+
Shared_Dirty: 0 kB
|
167
|
+
Private_Clean: 0 kB
|
168
|
+
Private_Dirty: 0 kB
|
169
|
+
Referenced: 0 kB
|
170
|
+
Anonymous: 0 kB
|
171
|
+
AnonHugePages: 0 kB
|
172
|
+
Swap: 0 kB
|
173
|
+
KernelPageSize: 4 kB
|
174
|
+
MMUPageSize: 4 kB
|
175
|
+
Locked: 0 kB
|
176
|
+
VmFlags: mr mw me
|
177
|
+
7f28ff91b000-7f28ff91c000 r--p 00009000 07:01 81122 /lib/libnss_nis-2.11.1.so
|
178
|
+
Size: 4 kB
|
179
|
+
Rss: 4 kB
|
180
|
+
Pss: 4 kB
|
181
|
+
Shared_Clean: 0 kB
|
182
|
+
Shared_Dirty: 0 kB
|
183
|
+
Private_Clean: 0 kB
|
184
|
+
Private_Dirty: 4 kB
|
185
|
+
Referenced: 4 kB
|
186
|
+
Anonymous: 4 kB
|
187
|
+
AnonHugePages: 0 kB
|
188
|
+
Swap: 0 kB
|
189
|
+
KernelPageSize: 4 kB
|
190
|
+
MMUPageSize: 4 kB
|
191
|
+
Locked: 0 kB
|
192
|
+
VmFlags: rd mr mw me ac
|
193
|
+
7f28ff91c000-7f28ff91d000 rw-p 0000a000 07:01 81122 /lib/libnss_nis-2.11.1.so
|
194
|
+
Size: 4 kB
|
195
|
+
Rss: 4 kB
|
196
|
+
Pss: 4 kB
|
197
|
+
Shared_Clean: 0 kB
|
198
|
+
Shared_Dirty: 0 kB
|
199
|
+
Private_Clean: 0 kB
|
200
|
+
Private_Dirty: 4 kB
|
201
|
+
Referenced: 4 kB
|
202
|
+
Anonymous: 4 kB
|
203
|
+
AnonHugePages: 0 kB
|
204
|
+
Swap: 0 kB
|
205
|
+
KernelPageSize: 4 kB
|
206
|
+
MMUPageSize: 4 kB
|
207
|
+
Locked: 0 kB
|
208
|
+
VmFlags: rd wr mr mw me ac
|
209
|
+
7f28ff91d000-7f28ff934000 r-xp 00000000 07:01 81117 /lib/libnsl-2.11.1.so
|
210
|
+
Size: 92 kB
|
211
|
+
Rss: 24 kB
|
212
|
+
Pss: 0 kB
|
213
|
+
Shared_Clean: 24 kB
|
214
|
+
Shared_Dirty: 0 kB
|
215
|
+
Private_Clean: 0 kB
|
216
|
+
Private_Dirty: 0 kB
|
217
|
+
Referenced: 24 kB
|
218
|
+
Anonymous: 0 kB
|
219
|
+
AnonHugePages: 0 kB
|
220
|
+
Swap: 0 kB
|
221
|
+
KernelPageSize: 4 kB
|
222
|
+
MMUPageSize: 4 kB
|
223
|
+
Locked: 0 kB
|
224
|
+
VmFlags: rd ex mr mw me
|
225
|
+
7f28ff934000-7f28ffb33000 ---p 00017000 07:01 81117 /lib/libnsl-2.11.1.so
|
226
|
+
Size: 2044 kB
|
227
|
+
Rss: 0 kB
|
228
|
+
Pss: 0 kB
|
229
|
+
Shared_Clean: 0 kB
|
230
|
+
Shared_Dirty: 0 kB
|
231
|
+
Private_Clean: 0 kB
|
232
|
+
Private_Dirty: 0 kB
|
233
|
+
Referenced: 0 kB
|
234
|
+
Anonymous: 0 kB
|
235
|
+
AnonHugePages: 0 kB
|
236
|
+
Swap: 0 kB
|
237
|
+
KernelPageSize: 4 kB
|
238
|
+
MMUPageSize: 4 kB
|
239
|
+
Locked: 0 kB
|
240
|
+
VmFlags: mr mw me
|
241
|
+
7f28ffb33000-7f28ffb34000 r--p 00016000 07:01 81117 /lib/libnsl-2.11.1.so
|
242
|
+
Size: 4 kB
|
243
|
+
Rss: 4 kB
|
244
|
+
Pss: 4 kB
|
245
|
+
Shared_Clean: 0 kB
|
246
|
+
Shared_Dirty: 0 kB
|
247
|
+
Private_Clean: 0 kB
|
248
|
+
Private_Dirty: 4 kB
|
249
|
+
Referenced: 4 kB
|
250
|
+
Anonymous: 4 kB
|
251
|
+
AnonHugePages: 0 kB
|
252
|
+
Swap: 0 kB
|
253
|
+
KernelPageSize: 4 kB
|
254
|
+
MMUPageSize: 4 kB
|
255
|
+
Locked: 0 kB
|
256
|
+
VmFlags: rd mr mw me ac
|
257
|
+
7f28ffb34000-7f28ffb35000 rw-p 00017000 07:01 81117 /lib/libnsl-2.11.1.so
|
258
|
+
Size: 4 kB
|
259
|
+
Rss: 4 kB
|
260
|
+
Pss: 4 kB
|
261
|
+
Shared_Clean: 0 kB
|
262
|
+
Shared_Dirty: 0 kB
|
263
|
+
Private_Clean: 0 kB
|
264
|
+
Private_Dirty: 4 kB
|
265
|
+
Referenced: 4 kB
|
266
|
+
Anonymous: 4 kB
|
267
|
+
AnonHugePages: 0 kB
|
268
|
+
Swap: 0 kB
|
269
|
+
KernelPageSize: 4 kB
|
270
|
+
MMUPageSize: 4 kB
|
271
|
+
Locked: 0 kB
|
272
|
+
VmFlags: rd wr mr mw me ac
|
273
|
+
7f28ffb35000-7f28ffb37000 rw-p 00000000 00:00 0
|
274
|
+
Size: 8 kB
|
275
|
+
Rss: 0 kB
|
276
|
+
Pss: 0 kB
|
277
|
+
Shared_Clean: 0 kB
|
278
|
+
Shared_Dirty: 0 kB
|
279
|
+
Private_Clean: 0 kB
|
280
|
+
Private_Dirty: 0 kB
|
281
|
+
Referenced: 0 kB
|
282
|
+
Anonymous: 0 kB
|
283
|
+
AnonHugePages: 0 kB
|
284
|
+
Swap: 0 kB
|
285
|
+
KernelPageSize: 4 kB
|
286
|
+
MMUPageSize: 4 kB
|
287
|
+
Locked: 0 kB
|
288
|
+
VmFlags: rd wr mr mw me ac
|
289
|
+
7f28ffb37000-7f28ffb3f000 r-xp 00000000 07:01 81118 /lib/libnss_compat-2.11.1.so
|
290
|
+
Size: 32 kB
|
291
|
+
Rss: 24 kB
|
292
|
+
Pss: 0 kB
|
293
|
+
Shared_Clean: 24 kB
|
294
|
+
Shared_Dirty: 0 kB
|
295
|
+
Private_Clean: 0 kB
|
296
|
+
Private_Dirty: 0 kB
|
297
|
+
Referenced: 24 kB
|
298
|
+
Anonymous: 0 kB
|
299
|
+
AnonHugePages: 0 kB
|
300
|
+
Swap: 0 kB
|
301
|
+
KernelPageSize: 4 kB
|
302
|
+
MMUPageSize: 4 kB
|
303
|
+
Locked: 0 kB
|
304
|
+
VmFlags: rd ex mr mw me
|
305
|
+
7f28ffb3f000-7f28ffd3e000 ---p 00008000 07:01 81118 /lib/libnss_compat-2.11.1.so
|
306
|
+
Size: 2044 kB
|
307
|
+
Rss: 0 kB
|
308
|
+
Pss: 0 kB
|
309
|
+
Shared_Clean: 0 kB
|
310
|
+
Shared_Dirty: 0 kB
|
311
|
+
Private_Clean: 0 kB
|
312
|
+
Private_Dirty: 0 kB
|
313
|
+
Referenced: 0 kB
|
314
|
+
Anonymous: 0 kB
|
315
|
+
AnonHugePages: 0 kB
|
316
|
+
Swap: 0 kB
|
317
|
+
KernelPageSize: 4 kB
|
318
|
+
MMUPageSize: 4 kB
|
319
|
+
Locked: 0 kB
|
320
|
+
VmFlags: mr mw me
|
321
|
+
7f28ffd3e000-7f28ffd3f000 r--p 00007000 07:01 81118 /lib/libnss_compat-2.11.1.so
|
322
|
+
Size: 4 kB
|
323
|
+
Rss: 4 kB
|
324
|
+
Pss: 4 kB
|
325
|
+
Shared_Clean: 0 kB
|
326
|
+
Shared_Dirty: 0 kB
|
327
|
+
Private_Clean: 0 kB
|
328
|
+
Private_Dirty: 4 kB
|
329
|
+
Referenced: 4 kB
|
330
|
+
Anonymous: 4 kB
|
331
|
+
AnonHugePages: 0 kB
|
332
|
+
Swap: 0 kB
|
333
|
+
KernelPageSize: 4 kB
|
334
|
+
MMUPageSize: 4 kB
|
335
|
+
Locked: 0 kB
|
336
|
+
VmFlags: rd mr mw me ac
|
337
|
+
7f28ffd3f000-7f28ffd40000 rw-p 00008000 07:01 81118 /lib/libnss_compat-2.11.1.so
|
338
|
+
Size: 4 kB
|
339
|
+
Rss: 4 kB
|
340
|
+
Pss: 4 kB
|
341
|
+
Shared_Clean: 0 kB
|
342
|
+
Shared_Dirty: 0 kB
|
343
|
+
Private_Clean: 0 kB
|
344
|
+
Private_Dirty: 4 kB
|
345
|
+
Referenced: 4 kB
|
346
|
+
Anonymous: 4 kB
|
347
|
+
AnonHugePages: 0 kB
|
348
|
+
Swap: 0 kB
|
349
|
+
KernelPageSize: 4 kB
|
350
|
+
MMUPageSize: 4 kB
|
351
|
+
Locked: 0 kB
|
352
|
+
VmFlags: rd wr mr mw me ac
|
353
|
+
7f28ffd40000-7f28ffebd000 r-xp 00000000 07:01 81088 /lib/libc-2.11.1.so
|
354
|
+
Size: 1524 kB
|
355
|
+
Rss: 540 kB
|
356
|
+
Pss: 10 kB
|
357
|
+
Shared_Clean: 532 kB
|
358
|
+
Shared_Dirty: 0 kB
|
359
|
+
Private_Clean: 8 kB
|
360
|
+
Private_Dirty: 0 kB
|
361
|
+
Referenced: 540 kB
|
362
|
+
Anonymous: 0 kB
|
363
|
+
AnonHugePages: 0 kB
|
364
|
+
Swap: 0 kB
|
365
|
+
KernelPageSize: 4 kB
|
366
|
+
MMUPageSize: 4 kB
|
367
|
+
Locked: 0 kB
|
368
|
+
VmFlags: rd ex mr mw me
|
369
|
+
7f28ffebd000-7f29000bc000 ---p 0017d000 07:01 81088 /lib/libc-2.11.1.so
|
370
|
+
Size: 2044 kB
|
371
|
+
Rss: 0 kB
|
372
|
+
Pss: 0 kB
|
373
|
+
Shared_Clean: 0 kB
|
374
|
+
Shared_Dirty: 0 kB
|
375
|
+
Private_Clean: 0 kB
|
376
|
+
Private_Dirty: 0 kB
|
377
|
+
Referenced: 0 kB
|
378
|
+
Anonymous: 0 kB
|
379
|
+
AnonHugePages: 0 kB
|
380
|
+
Swap: 0 kB
|
381
|
+
KernelPageSize: 4 kB
|
382
|
+
MMUPageSize: 4 kB
|
383
|
+
Locked: 0 kB
|
384
|
+
VmFlags: mr mw me
|
385
|
+
7f29000bc000-7f29000c0000 r--p 0017c000 07:01 81088 /lib/libc-2.11.1.so
|
386
|
+
Size: 16 kB
|
387
|
+
Rss: 16 kB
|
388
|
+
Pss: 16 kB
|
389
|
+
Shared_Clean: 0 kB
|
390
|
+
Shared_Dirty: 0 kB
|
391
|
+
Private_Clean: 0 kB
|
392
|
+
Private_Dirty: 16 kB
|
393
|
+
Referenced: 16 kB
|
394
|
+
Anonymous: 16 kB
|
395
|
+
AnonHugePages: 0 kB
|
396
|
+
Swap: 0 kB
|
397
|
+
KernelPageSize: 4 kB
|
398
|
+
MMUPageSize: 4 kB
|
399
|
+
Locked: 0 kB
|
400
|
+
VmFlags: rd mr mw me ac
|
401
|
+
7f29000c0000-7f29000c1000 rw-p 00180000 07:01 81088 /lib/libc-2.11.1.so
|
402
|
+
Size: 4 kB
|
403
|
+
Rss: 4 kB
|
404
|
+
Pss: 4 kB
|
405
|
+
Shared_Clean: 0 kB
|
406
|
+
Shared_Dirty: 0 kB
|
407
|
+
Private_Clean: 0 kB
|
408
|
+
Private_Dirty: 4 kB
|
409
|
+
Referenced: 4 kB
|
410
|
+
Anonymous: 4 kB
|
411
|
+
AnonHugePages: 0 kB
|
412
|
+
Swap: 0 kB
|
413
|
+
KernelPageSize: 4 kB
|
414
|
+
MMUPageSize: 4 kB
|
415
|
+
Locked: 0 kB
|
416
|
+
VmFlags: rd wr mr mw me ac
|
417
|
+
7f29000c1000-7f29000c6000 rw-p 00000000 00:00 0
|
418
|
+
Size: 20 kB
|
419
|
+
Rss: 16 kB
|
420
|
+
Pss: 16 kB
|
421
|
+
Shared_Clean: 0 kB
|
422
|
+
Shared_Dirty: 0 kB
|
423
|
+
Private_Clean: 0 kB
|
424
|
+
Private_Dirty: 16 kB
|
425
|
+
Referenced: 16 kB
|
426
|
+
Anonymous: 16 kB
|
427
|
+
AnonHugePages: 0 kB
|
428
|
+
Swap: 0 kB
|
429
|
+
KernelPageSize: 4 kB
|
430
|
+
MMUPageSize: 4 kB
|
431
|
+
Locked: 0 kB
|
432
|
+
VmFlags: rd wr mr mw me ac
|
433
|
+
7f29000c6000-7f29000c8000 r-xp 00000000 07:01 81095 /lib/libdl-2.11.1.so
|
434
|
+
Size: 8 kB
|
435
|
+
Rss: 8 kB
|
436
|
+
Pss: 0 kB
|
437
|
+
Shared_Clean: 8 kB
|
438
|
+
Shared_Dirty: 0 kB
|
439
|
+
Private_Clean: 0 kB
|
440
|
+
Private_Dirty: 0 kB
|
441
|
+
Referenced: 8 kB
|
442
|
+
Anonymous: 0 kB
|
443
|
+
AnonHugePages: 0 kB
|
444
|
+
Swap: 0 kB
|
445
|
+
KernelPageSize: 4 kB
|
446
|
+
MMUPageSize: 4 kB
|
447
|
+
Locked: 0 kB
|
448
|
+
VmFlags: rd ex mr mw me
|
449
|
+
7f29000c8000-7f29002c8000 ---p 00002000 07:01 81095 /lib/libdl-2.11.1.so
|
450
|
+
Size: 2048 kB
|
451
|
+
Rss: 0 kB
|
452
|
+
Pss: 0 kB
|
453
|
+
Shared_Clean: 0 kB
|
454
|
+
Shared_Dirty: 0 kB
|
455
|
+
Private_Clean: 0 kB
|
456
|
+
Private_Dirty: 0 kB
|
457
|
+
Referenced: 0 kB
|
458
|
+
Anonymous: 0 kB
|
459
|
+
AnonHugePages: 0 kB
|
460
|
+
Swap: 0 kB
|
461
|
+
KernelPageSize: 4 kB
|
462
|
+
MMUPageSize: 4 kB
|
463
|
+
Locked: 0 kB
|
464
|
+
VmFlags: mr mw me
|
465
|
+
7f29002c8000-7f29002c9000 r--p 00002000 07:01 81095 /lib/libdl-2.11.1.so
|
466
|
+
Size: 4 kB
|
467
|
+
Rss: 4 kB
|
468
|
+
Pss: 4 kB
|
469
|
+
Shared_Clean: 0 kB
|
470
|
+
Shared_Dirty: 0 kB
|
471
|
+
Private_Clean: 0 kB
|
472
|
+
Private_Dirty: 4 kB
|
473
|
+
Referenced: 4 kB
|
474
|
+
Anonymous: 4 kB
|
475
|
+
AnonHugePages: 0 kB
|
476
|
+
Swap: 0 kB
|
477
|
+
KernelPageSize: 4 kB
|
478
|
+
MMUPageSize: 4 kB
|
479
|
+
Locked: 0 kB
|
480
|
+
VmFlags: rd mr mw me ac
|
481
|
+
7f29002c9000-7f29002ca000 rw-p 00003000 07:01 81095 /lib/libdl-2.11.1.so
|
482
|
+
Size: 4 kB
|
483
|
+
Rss: 4 kB
|
484
|
+
Pss: 4 kB
|
485
|
+
Shared_Clean: 0 kB
|
486
|
+
Shared_Dirty: 0 kB
|
487
|
+
Private_Clean: 0 kB
|
488
|
+
Private_Dirty: 4 kB
|
489
|
+
Referenced: 4 kB
|
490
|
+
Anonymous: 4 kB
|
491
|
+
AnonHugePages: 0 kB
|
492
|
+
Swap: 0 kB
|
493
|
+
KernelPageSize: 4 kB
|
494
|
+
MMUPageSize: 4 kB
|
495
|
+
Locked: 0 kB
|
496
|
+
VmFlags: rd wr mr mw me ac
|
497
|
+
7f29002ca000-7f2900308000 r-xp 00000000 07:01 81113 /lib/libncurses.so.5.7
|
498
|
+
Size: 248 kB
|
499
|
+
Rss: 136 kB
|
500
|
+
Pss: 77 kB
|
501
|
+
Shared_Clean: 68 kB
|
502
|
+
Shared_Dirty: 0 kB
|
503
|
+
Private_Clean: 68 kB
|
504
|
+
Private_Dirty: 0 kB
|
505
|
+
Referenced: 136 kB
|
506
|
+
Anonymous: 0 kB
|
507
|
+
AnonHugePages: 0 kB
|
508
|
+
Swap: 0 kB
|
509
|
+
KernelPageSize: 4 kB
|
510
|
+
MMUPageSize: 4 kB
|
511
|
+
Locked: 0 kB
|
512
|
+
VmFlags: rd ex mr mw me
|
513
|
+
7f2900308000-7f2900508000 ---p 0003e000 07:01 81113 /lib/libncurses.so.5.7
|
514
|
+
Size: 2048 kB
|
515
|
+
Rss: 0 kB
|
516
|
+
Pss: 0 kB
|
517
|
+
Shared_Clean: 0 kB
|
518
|
+
Shared_Dirty: 0 kB
|
519
|
+
Private_Clean: 0 kB
|
520
|
+
Private_Dirty: 0 kB
|
521
|
+
Referenced: 0 kB
|
522
|
+
Anonymous: 0 kB
|
523
|
+
AnonHugePages: 0 kB
|
524
|
+
Swap: 0 kB
|
525
|
+
KernelPageSize: 4 kB
|
526
|
+
MMUPageSize: 4 kB
|
527
|
+
Locked: 0 kB
|
528
|
+
VmFlags: mr mw me
|
529
|
+
7f2900508000-7f290050c000 r--p 0003e000 07:01 81113 /lib/libncurses.so.5.7
|
530
|
+
Size: 16 kB
|
531
|
+
Rss: 16 kB
|
532
|
+
Pss: 16 kB
|
533
|
+
Shared_Clean: 0 kB
|
534
|
+
Shared_Dirty: 0 kB
|
535
|
+
Private_Clean: 0 kB
|
536
|
+
Private_Dirty: 16 kB
|
537
|
+
Referenced: 16 kB
|
538
|
+
Anonymous: 16 kB
|
539
|
+
AnonHugePages: 0 kB
|
540
|
+
Swap: 0 kB
|
541
|
+
KernelPageSize: 4 kB
|
542
|
+
MMUPageSize: 4 kB
|
543
|
+
Locked: 0 kB
|
544
|
+
VmFlags: rd mr mw me ac
|
545
|
+
7f290050c000-7f290050d000 rw-p 00042000 07:01 81113 /lib/libncurses.so.5.7
|
546
|
+
Size: 4 kB
|
547
|
+
Rss: 4 kB
|
548
|
+
Pss: 4 kB
|
549
|
+
Shared_Clean: 0 kB
|
550
|
+
Shared_Dirty: 0 kB
|
551
|
+
Private_Clean: 0 kB
|
552
|
+
Private_Dirty: 4 kB
|
553
|
+
Referenced: 4 kB
|
554
|
+
Anonymous: 4 kB
|
555
|
+
AnonHugePages: 0 kB
|
556
|
+
Swap: 0 kB
|
557
|
+
KernelPageSize: 4 kB
|
558
|
+
MMUPageSize: 4 kB
|
559
|
+
Locked: 0 kB
|
560
|
+
VmFlags: rd wr mr mw me ac
|
561
|
+
7f290050d000-7f290052d000 r-xp 00000000 07:01 81079 /lib/ld-2.11.1.so
|
562
|
+
Size: 128 kB
|
563
|
+
Rss: 112 kB
|
564
|
+
Pss: 0 kB
|
565
|
+
Shared_Clean: 112 kB
|
566
|
+
Shared_Dirty: 0 kB
|
567
|
+
Private_Clean: 0 kB
|
568
|
+
Private_Dirty: 0 kB
|
569
|
+
Referenced: 112 kB
|
570
|
+
Anonymous: 0 kB
|
571
|
+
AnonHugePages: 0 kB
|
572
|
+
Swap: 0 kB
|
573
|
+
KernelPageSize: 4 kB
|
574
|
+
MMUPageSize: 4 kB
|
575
|
+
Locked: 0 kB
|
576
|
+
VmFlags: rd ex mr mw me dw
|
577
|
+
7f29005b9000-7f29005f8000 r--p 00000000 07:01 33875 /usr/lib/locale/en_US.utf8/LC_CTYPE
|
578
|
+
Size: 252 kB
|
579
|
+
Rss: 24 kB
|
580
|
+
Pss: 8 kB
|
581
|
+
Shared_Clean: 16 kB
|
582
|
+
Shared_Dirty: 0 kB
|
583
|
+
Private_Clean: 8 kB
|
584
|
+
Private_Dirty: 0 kB
|
585
|
+
Referenced: 24 kB
|
586
|
+
Anonymous: 0 kB
|
587
|
+
AnonHugePages: 0 kB
|
588
|
+
Swap: 0 kB
|
589
|
+
KernelPageSize: 4 kB
|
590
|
+
MMUPageSize: 4 kB
|
591
|
+
Locked: 0 kB
|
592
|
+
VmFlags: rd mr mw me
|
593
|
+
7f29005f8000-7f2900716000 r--p 00000000 07:01 33874 /usr/lib/locale/en_US.utf8/LC_COLLATE
|
594
|
+
Size: 1144 kB
|
595
|
+
Rss: 12 kB
|
596
|
+
Pss: 1 kB
|
597
|
+
Shared_Clean: 12 kB
|
598
|
+
Shared_Dirty: 0 kB
|
599
|
+
Private_Clean: 0 kB
|
600
|
+
Private_Dirty: 0 kB
|
601
|
+
Referenced: 12 kB
|
602
|
+
Anonymous: 0 kB
|
603
|
+
AnonHugePages: 0 kB
|
604
|
+
Swap: 0 kB
|
605
|
+
KernelPageSize: 4 kB
|
606
|
+
MMUPageSize: 4 kB
|
607
|
+
Locked: 0 kB
|
608
|
+
VmFlags: rd mr mw me
|
609
|
+
7f2900716000-7f2900719000 rw-p 00000000 00:00 0
|
610
|
+
Size: 12 kB
|
611
|
+
Rss: 12 kB
|
612
|
+
Pss: 12 kB
|
613
|
+
Shared_Clean: 0 kB
|
614
|
+
Shared_Dirty: 0 kB
|
615
|
+
Private_Clean: 0 kB
|
616
|
+
Private_Dirty: 12 kB
|
617
|
+
Referenced: 12 kB
|
618
|
+
Anonymous: 12 kB
|
619
|
+
AnonHugePages: 0 kB
|
620
|
+
Swap: 0 kB
|
621
|
+
KernelPageSize: 4 kB
|
622
|
+
MMUPageSize: 4 kB
|
623
|
+
Locked: 0 kB
|
624
|
+
VmFlags: rd wr mr mw me ac
|
625
|
+
7f2900719000-7f290071a000 r--p 00000000 07:01 33880 /usr/lib/locale/en_US.utf8/LC_NUMERIC
|
626
|
+
Size: 4 kB
|
627
|
+
Rss: 4 kB
|
628
|
+
Pss: 0 kB
|
629
|
+
Shared_Clean: 4 kB
|
630
|
+
Shared_Dirty: 0 kB
|
631
|
+
Private_Clean: 0 kB
|
632
|
+
Private_Dirty: 0 kB
|
633
|
+
Referenced: 4 kB
|
634
|
+
Anonymous: 0 kB
|
635
|
+
AnonHugePages: 0 kB
|
636
|
+
Swap: 0 kB
|
637
|
+
KernelPageSize: 4 kB
|
638
|
+
MMUPageSize: 4 kB
|
639
|
+
Locked: 0 kB
|
640
|
+
VmFlags: rd mr mw me
|
641
|
+
7f290071a000-7f290071b000 r--p 00000000 07:01 33883 /usr/lib/locale/en_US.utf8/LC_TIME
|
642
|
+
Size: 4 kB
|
643
|
+
Rss: 4 kB
|
644
|
+
Pss: 0 kB
|
645
|
+
Shared_Clean: 4 kB
|
646
|
+
Shared_Dirty: 0 kB
|
647
|
+
Private_Clean: 0 kB
|
648
|
+
Private_Dirty: 0 kB
|
649
|
+
Referenced: 4 kB
|
650
|
+
Anonymous: 0 kB
|
651
|
+
AnonHugePages: 0 kB
|
652
|
+
Swap: 0 kB
|
653
|
+
KernelPageSize: 4 kB
|
654
|
+
MMUPageSize: 4 kB
|
655
|
+
Locked: 0 kB
|
656
|
+
VmFlags: rd mr mw me
|
657
|
+
7f290071b000-7f290071c000 r--p 00000000 07:01 33878 /usr/lib/locale/en_US.utf8/LC_MONETARY
|
658
|
+
Size: 4 kB
|
659
|
+
Rss: 4 kB
|
660
|
+
Pss: 0 kB
|
661
|
+
Shared_Clean: 4 kB
|
662
|
+
Shared_Dirty: 0 kB
|
663
|
+
Private_Clean: 0 kB
|
664
|
+
Private_Dirty: 0 kB
|
665
|
+
Referenced: 4 kB
|
666
|
+
Anonymous: 0 kB
|
667
|
+
AnonHugePages: 0 kB
|
668
|
+
Swap: 0 kB
|
669
|
+
KernelPageSize: 4 kB
|
670
|
+
MMUPageSize: 4 kB
|
671
|
+
Locked: 0 kB
|
672
|
+
VmFlags: rd mr mw me
|
673
|
+
7f290071c000-7f290071d000 r--p 00000000 07:01 48708 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
|
674
|
+
Size: 4 kB
|
675
|
+
Rss: 4 kB
|
676
|
+
Pss: 0 kB
|
677
|
+
Shared_Clean: 4 kB
|
678
|
+
Shared_Dirty: 0 kB
|
679
|
+
Private_Clean: 0 kB
|
680
|
+
Private_Dirty: 0 kB
|
681
|
+
Referenced: 4 kB
|
682
|
+
Anonymous: 0 kB
|
683
|
+
AnonHugePages: 0 kB
|
684
|
+
Swap: 0 kB
|
685
|
+
KernelPageSize: 4 kB
|
686
|
+
MMUPageSize: 4 kB
|
687
|
+
Locked: 0 kB
|
688
|
+
VmFlags: rd mr mw me
|
689
|
+
7f290071d000-7f290071e000 r--p 00000000 07:01 33881 /usr/lib/locale/en_US.utf8/LC_PAPER
|
690
|
+
Size: 4 kB
|
691
|
+
Rss: 4 kB
|
692
|
+
Pss: 0 kB
|
693
|
+
Shared_Clean: 4 kB
|
694
|
+
Shared_Dirty: 0 kB
|
695
|
+
Private_Clean: 0 kB
|
696
|
+
Private_Dirty: 0 kB
|
697
|
+
Referenced: 4 kB
|
698
|
+
Anonymous: 0 kB
|
699
|
+
AnonHugePages: 0 kB
|
700
|
+
Swap: 0 kB
|
701
|
+
KernelPageSize: 4 kB
|
702
|
+
MMUPageSize: 4 kB
|
703
|
+
Locked: 0 kB
|
704
|
+
VmFlags: rd mr mw me
|
705
|
+
7f290071e000-7f290071f000 r--p 00000000 07:01 33879 /usr/lib/locale/en_US.utf8/LC_NAME
|
706
|
+
Size: 4 kB
|
707
|
+
Rss: 4 kB
|
708
|
+
Pss: 0 kB
|
709
|
+
Shared_Clean: 4 kB
|
710
|
+
Shared_Dirty: 0 kB
|
711
|
+
Private_Clean: 0 kB
|
712
|
+
Private_Dirty: 0 kB
|
713
|
+
Referenced: 4 kB
|
714
|
+
Anonymous: 0 kB
|
715
|
+
AnonHugePages: 0 kB
|
716
|
+
Swap: 0 kB
|
717
|
+
KernelPageSize: 4 kB
|
718
|
+
MMUPageSize: 4 kB
|
719
|
+
Locked: 0 kB
|
720
|
+
VmFlags: rd mr mw me
|
721
|
+
7f290071f000-7f2900720000 r--p 00000000 07:01 33873 /usr/lib/locale/en_US.utf8/LC_ADDRESS
|
722
|
+
Size: 4 kB
|
723
|
+
Rss: 4 kB
|
724
|
+
Pss: 0 kB
|
725
|
+
Shared_Clean: 4 kB
|
726
|
+
Shared_Dirty: 0 kB
|
727
|
+
Private_Clean: 0 kB
|
728
|
+
Private_Dirty: 0 kB
|
729
|
+
Referenced: 4 kB
|
730
|
+
Anonymous: 0 kB
|
731
|
+
AnonHugePages: 0 kB
|
732
|
+
Swap: 0 kB
|
733
|
+
KernelPageSize: 4 kB
|
734
|
+
MMUPageSize: 4 kB
|
735
|
+
Locked: 0 kB
|
736
|
+
VmFlags: rd mr mw me
|
737
|
+
7f2900720000-7f2900721000 r--p 00000000 07:01 33882 /usr/lib/locale/en_US.utf8/LC_TELEPHONE
|
738
|
+
Size: 4 kB
|
739
|
+
Rss: 4 kB
|
740
|
+
Pss: 0 kB
|
741
|
+
Shared_Clean: 4 kB
|
742
|
+
Shared_Dirty: 0 kB
|
743
|
+
Private_Clean: 0 kB
|
744
|
+
Private_Dirty: 0 kB
|
745
|
+
Referenced: 4 kB
|
746
|
+
Anonymous: 0 kB
|
747
|
+
AnonHugePages: 0 kB
|
748
|
+
Swap: 0 kB
|
749
|
+
KernelPageSize: 4 kB
|
750
|
+
MMUPageSize: 4 kB
|
751
|
+
Locked: 0 kB
|
752
|
+
VmFlags: rd mr mw me
|
753
|
+
7f2900721000-7f2900722000 r--p 00000000 07:01 33877 /usr/lib/locale/en_US.utf8/LC_MEASUREMENT
|
754
|
+
Size: 4 kB
|
755
|
+
Rss: 4 kB
|
756
|
+
Pss: 0 kB
|
757
|
+
Shared_Clean: 4 kB
|
758
|
+
Shared_Dirty: 0 kB
|
759
|
+
Private_Clean: 0 kB
|
760
|
+
Private_Dirty: 0 kB
|
761
|
+
Referenced: 4 kB
|
762
|
+
Anonymous: 0 kB
|
763
|
+
AnonHugePages: 0 kB
|
764
|
+
Swap: 0 kB
|
765
|
+
KernelPageSize: 4 kB
|
766
|
+
MMUPageSize: 4 kB
|
767
|
+
Locked: 0 kB
|
768
|
+
VmFlags: rd mr mw me
|
769
|
+
7f2900722000-7f2900729000 r--s 00000000 07:01 97395 /usr/lib/gconv/gconv-modules.cache
|
770
|
+
Size: 28 kB
|
771
|
+
Rss: 20 kB
|
772
|
+
Pss: 0 kB
|
773
|
+
Shared_Clean: 20 kB
|
774
|
+
Shared_Dirty: 0 kB
|
775
|
+
Private_Clean: 0 kB
|
776
|
+
Private_Dirty: 0 kB
|
777
|
+
Referenced: 20 kB
|
778
|
+
Anonymous: 0 kB
|
779
|
+
AnonHugePages: 0 kB
|
780
|
+
Swap: 0 kB
|
781
|
+
KernelPageSize: 4 kB
|
782
|
+
MMUPageSize: 4 kB
|
783
|
+
Locked: 0 kB
|
784
|
+
VmFlags: rd mr me ms
|
785
|
+
7f2900729000-7f290072a000 r--p 00000000 07:01 33876 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION
|
786
|
+
Size: 4 kB
|
787
|
+
Rss: 4 kB
|
788
|
+
Pss: 0 kB
|
789
|
+
Shared_Clean: 4 kB
|
790
|
+
Shared_Dirty: 0 kB
|
791
|
+
Private_Clean: 0 kB
|
792
|
+
Private_Dirty: 0 kB
|
793
|
+
Referenced: 4 kB
|
794
|
+
Anonymous: 0 kB
|
795
|
+
AnonHugePages: 0 kB
|
796
|
+
Swap: 0 kB
|
797
|
+
KernelPageSize: 4 kB
|
798
|
+
MMUPageSize: 4 kB
|
799
|
+
Locked: 0 kB
|
800
|
+
VmFlags: rd mr mw me
|
801
|
+
7f290072a000-7f290072c000 rw-p 00000000 00:00 0
|
802
|
+
Size: 8 kB
|
803
|
+
Rss: 8 kB
|
804
|
+
Pss: 8 kB
|
805
|
+
Shared_Clean: 0 kB
|
806
|
+
Shared_Dirty: 0 kB
|
807
|
+
Private_Clean: 0 kB
|
808
|
+
Private_Dirty: 8 kB
|
809
|
+
Referenced: 8 kB
|
810
|
+
Anonymous: 8 kB
|
811
|
+
AnonHugePages: 0 kB
|
812
|
+
Swap: 0 kB
|
813
|
+
KernelPageSize: 4 kB
|
814
|
+
MMUPageSize: 4 kB
|
815
|
+
Locked: 0 kB
|
816
|
+
VmFlags: rd wr mr mw me ac
|
817
|
+
7f290072c000-7f290072d000 r--p 0001f000 07:01 81079 /lib/ld-2.11.1.so
|
818
|
+
Size: 4 kB
|
819
|
+
Rss: 4 kB
|
820
|
+
Pss: 4 kB
|
821
|
+
Shared_Clean: 0 kB
|
822
|
+
Shared_Dirty: 0 kB
|
823
|
+
Private_Clean: 0 kB
|
824
|
+
Private_Dirty: 4 kB
|
825
|
+
Referenced: 4 kB
|
826
|
+
Anonymous: 4 kB
|
827
|
+
AnonHugePages: 0 kB
|
828
|
+
Swap: 0 kB
|
829
|
+
KernelPageSize: 4 kB
|
830
|
+
MMUPageSize: 4 kB
|
831
|
+
Locked: 0 kB
|
832
|
+
VmFlags: rd mr mw me dw ac
|
833
|
+
7f290072d000-7f290072e000 rw-p 00020000 07:01 81079 /lib/ld-2.11.1.so
|
834
|
+
Size: 4 kB
|
835
|
+
Rss: 4 kB
|
836
|
+
Pss: 4 kB
|
837
|
+
Shared_Clean: 0 kB
|
838
|
+
Shared_Dirty: 0 kB
|
839
|
+
Private_Clean: 0 kB
|
840
|
+
Private_Dirty: 4 kB
|
841
|
+
Referenced: 4 kB
|
842
|
+
Anonymous: 4 kB
|
843
|
+
AnonHugePages: 0 kB
|
844
|
+
Swap: 0 kB
|
845
|
+
KernelPageSize: 4 kB
|
846
|
+
MMUPageSize: 4 kB
|
847
|
+
Locked: 0 kB
|
848
|
+
VmFlags: rd wr mr mw me dw ac
|
849
|
+
7f290072e000-7f290072f000 rw-p 00000000 00:00 0
|
850
|
+
Size: 4 kB
|
851
|
+
Rss: 4 kB
|
852
|
+
Pss: 4 kB
|
853
|
+
Shared_Clean: 0 kB
|
854
|
+
Shared_Dirty: 0 kB
|
855
|
+
Private_Clean: 0 kB
|
856
|
+
Private_Dirty: 4 kB
|
857
|
+
Referenced: 4 kB
|
858
|
+
Anonymous: 4 kB
|
859
|
+
AnonHugePages: 0 kB
|
860
|
+
Swap: 0 kB
|
861
|
+
KernelPageSize: 4 kB
|
862
|
+
MMUPageSize: 4 kB
|
863
|
+
Locked: 0 kB
|
864
|
+
VmFlags: rd wr mr mw me ac
|
865
|
+
7ffff83a4000-7ffff83c5000 rw-p 00000000 00:00 0 [stack]
|
866
|
+
Size: 136 kB
|
867
|
+
Rss: 28 kB
|
868
|
+
Pss: 28 kB
|
869
|
+
Shared_Clean: 0 kB
|
870
|
+
Shared_Dirty: 0 kB
|
871
|
+
Private_Clean: 0 kB
|
872
|
+
Private_Dirty: 28 kB
|
873
|
+
Referenced: 28 kB
|
874
|
+
Anonymous: 28 kB
|
875
|
+
AnonHugePages: 0 kB
|
876
|
+
Swap: 0 kB
|
877
|
+
KernelPageSize: 4 kB
|
878
|
+
MMUPageSize: 4 kB
|
879
|
+
Locked: 0 kB
|
880
|
+
VmFlags: rd wr mr mw me gd ac
|
881
|
+
7ffff83fe000-7ffff8400000 r-xp 00000000 00:00 0 [vdso]
|
882
|
+
Size: 8 kB
|
883
|
+
Rss: 4 kB
|
884
|
+
Pss: 0 kB
|
885
|
+
Shared_Clean: 4 kB
|
886
|
+
Shared_Dirty: 0 kB
|
887
|
+
Private_Clean: 0 kB
|
888
|
+
Private_Dirty: 0 kB
|
889
|
+
Referenced: 4 kB
|
890
|
+
Anonymous: 0 kB
|
891
|
+
AnonHugePages: 0 kB
|
892
|
+
Swap: 0 kB
|
893
|
+
KernelPageSize: 4 kB
|
894
|
+
MMUPageSize: 4 kB
|
895
|
+
Locked: 0 kB
|
896
|
+
VmFlags: rd ex mr mw me de
|
897
|
+
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
|
898
|
+
Size: 4 kB
|
899
|
+
Rss: 0 kB
|
900
|
+
Pss: 0 kB
|
901
|
+
Shared_Clean: 0 kB
|
902
|
+
Shared_Dirty: 0 kB
|
903
|
+
Private_Clean: 0 kB
|
904
|
+
Private_Dirty: 0 kB
|
905
|
+
Referenced: 0 kB
|
906
|
+
Anonymous: 0 kB
|
907
|
+
AnonHugePages: 0 kB
|
908
|
+
Swap: 0 kB
|
909
|
+
KernelPageSize: 4 kB
|
910
|
+
MMUPageSize: 4 kB
|
911
|
+
Locked: 0 kB
|
912
|
+
VmFlags: rd ex
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class GetProcessMemTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def setup
|
6
|
+
@mem = GetProcessMem.new
|
7
|
+
end
|
8
|
+
|
9
|
+
def test_seems_to_work
|
10
|
+
assert @mem.kb > 0
|
11
|
+
assert @mem.mb > 0
|
12
|
+
assert @mem.gb > 0
|
13
|
+
assert @mem.bytes > 0
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_linux_smap
|
17
|
+
delta = 1
|
18
|
+
bytes = @mem.linux_memory(fixture_path("heroku-bash-smap"))
|
19
|
+
assert_in_delta BigDecimal.new("2122240.0"), bytes, delta
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_conversions
|
23
|
+
bytes = 0
|
24
|
+
delta = BigDecimal.new("0.0000001")
|
25
|
+
assert_in_delta 0.0, @mem.kb(bytes), delta
|
26
|
+
assert_in_delta 0.0, @mem.mb(bytes), delta
|
27
|
+
assert_in_delta 0.0, @mem.gb(bytes), delta
|
28
|
+
|
29
|
+
# kb
|
30
|
+
bytes = 1024
|
31
|
+
assert_in_delta 1.0, @mem.kb(bytes), delta
|
32
|
+
assert_in_delta 0.0009765625, @mem.mb(bytes), delta
|
33
|
+
assert_in_delta 9.5367431640625e-07, @mem.gb(bytes), delta
|
34
|
+
|
35
|
+
# mb
|
36
|
+
bytes = 1_048_576
|
37
|
+
assert_in_delta 1024.0, @mem.kb(bytes), delta
|
38
|
+
assert_in_delta 1.0, @mem.mb(bytes), delta
|
39
|
+
assert_in_delta 0.0009765625, @mem.gb(bytes), delta
|
40
|
+
|
41
|
+
# gb
|
42
|
+
bytes = 1_073_741_824
|
43
|
+
assert_in_delta 1048576.0, @mem.kb(bytes), delta
|
44
|
+
assert_in_delta 1024.0, @mem.mb(bytes), delta
|
45
|
+
assert_in_delta 1.0, @mem.gb(bytes), delta
|
46
|
+
end
|
47
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: get_process_mem-1-8-7
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 17
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Romain Philibert
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2015-07-15 00:00:00 +09:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: rake
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 33
|
30
|
+
segments:
|
31
|
+
- 10
|
32
|
+
- 1
|
33
|
+
version: "10.1"
|
34
|
+
type: :development
|
35
|
+
version_requirements: *id001
|
36
|
+
description: " Get memory usage of a process in Ruby "
|
37
|
+
email:
|
38
|
+
- Filirom1@gmail.com
|
39
|
+
executables: []
|
40
|
+
|
41
|
+
extensions: []
|
42
|
+
|
43
|
+
extra_rdoc_files: []
|
44
|
+
|
45
|
+
files:
|
46
|
+
- .gitignore
|
47
|
+
- .travis.yml
|
48
|
+
- CHANGELOG.md
|
49
|
+
- Gemfile
|
50
|
+
- README.md
|
51
|
+
- Rakefile
|
52
|
+
- get_process_mem.gemspec
|
53
|
+
- lib/get_process_mem.rb
|
54
|
+
- lib/get_process_mem/version.rb
|
55
|
+
- test/fixtures/heroku-bash-smap
|
56
|
+
- test/get_process_mem_test.rb
|
57
|
+
- test/test_helper.rb
|
58
|
+
has_rdoc: true
|
59
|
+
homepage: https://github.com/worldline/get_process_mem
|
60
|
+
licenses:
|
61
|
+
- MIT
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options: []
|
64
|
+
|
65
|
+
require_paths:
|
66
|
+
- lib
|
67
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
hash: 3
|
73
|
+
segments:
|
74
|
+
- 0
|
75
|
+
version: "0"
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
none: false
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
hash: 3
|
82
|
+
segments:
|
83
|
+
- 0
|
84
|
+
version: "0"
|
85
|
+
requirements: []
|
86
|
+
|
87
|
+
rubyforge_project:
|
88
|
+
rubygems_version: 1.3.7
|
89
|
+
signing_key:
|
90
|
+
specification_version: 3
|
91
|
+
summary: Use GetProcessMem to find out the amount of RAM used by any process
|
92
|
+
test_files:
|
93
|
+
- test/fixtures/heroku-bash-smap
|
94
|
+
- test/get_process_mem_test.rb
|
95
|
+
- test/test_helper.rb
|