|
16 | 16 |
|
17 | 17 | context 'when there is swap memory' do |
18 | 18 | let(:total) { 4_036_680 * 1024 } |
19 | | - let(:free) { 3_547_792 * 1024 } |
20 | 19 | let(:buffers) { 4_288 * 1024 } |
21 | 20 | let(:cached) { 298_624 * 1024 } |
| 21 | + let(:free) { (3_547_792 * 1024) + buffers + cached } |
22 | 22 | let(:s_reclaimable) { 29_072 * 1024 } |
23 | | - let(:used) { total - free - buffers - cached - s_reclaimable } |
| 23 | + let(:used) { total - free - s_reclaimable } |
24 | 24 | let(:swap_total) { 2_097_148 * 1024 } |
25 | 25 | let(:swap_free) { 2_097_148 * 1024 } |
26 | 26 | let(:swap_used) { swap_total - swap_free } |
|
65 | 65 |
|
66 | 66 | context 'when there is not swap memory' do |
67 | 67 | let(:total) { 4_134_510_592 } |
68 | | - let(:free) { 3_465_723_904 } |
69 | 68 | let(:buffers) { 2_088 * 1024 } |
70 | 69 | let(:cached) { 445_204 * 1024 } |
| 70 | + let(:free) { 3_465_723_904 + buffers + cached } |
71 | 71 | let(:s_reclaimable) { 71_384 * 1024 } |
72 | | - let(:used) { total - free - buffers - cached - s_reclaimable } |
| 72 | + let(:used) { total - free - s_reclaimable } |
73 | 73 | let(:fixture_name) { 'meminfo2' } |
74 | 74 |
|
75 | 75 | it 'returns total memory' do |
|
109 | 109 |
|
110 | 110 | context 'when on Rhel 5' do |
111 | 111 | let(:total) { 4_036_680 * 1024 } |
112 | | - let(:free) { 3_547_792 * 1024 } |
113 | 112 | let(:buffers) { 4_288 * 1024 } |
114 | 113 | let(:cached) { 298_624 * 1024 } |
| 114 | + let(:free) { (3_547_792 * 1024) + buffers + cached } |
115 | 115 | let(:s_reclaimable) { 0 } |
116 | | - let(:used) { total - free - buffers - cached - s_reclaimable } |
| 116 | + let(:used) { total - free - s_reclaimable } |
117 | 117 | let(:swap_total) { 2_097_148 * 1024 } |
118 | 118 | let(:swap_free) { 2_097_148 * 1024 } |
119 | 119 | let(:swap_used) { swap_total - swap_free } |
|
0 commit comments