mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 15:32:30 +00:00
Merge pull request #10099 from GabyCT/topic/fixmemo
metrics: Update memory tests to use grep -F
This commit is contained in:
commit
20a88b6470
@ -179,7 +179,7 @@ EOF
|
||||
function grab_slab() {
|
||||
# Grabbing slab total from meminfo is easier than doing the math
|
||||
# on slabinfo
|
||||
item=$(fgrep "Slab:" /proc/meminfo | awk '{print $2}')
|
||||
item=$(grep -F "Slab:" /proc/meminfo | awk '{print $2}')
|
||||
((item*=1024))
|
||||
|
||||
local json="$(cat << EOF
|
||||
@ -213,7 +213,7 @@ function grab_system() {
|
||||
local free_decr=$((base_mem_free-item))
|
||||
|
||||
# Anon pages
|
||||
local anon=$(fgrep "AnonPages:" /proc/meminfo | awk '{print $2}')
|
||||
local anon=$(grep -F "AnonPages:" /proc/meminfo | awk '{print $2}')
|
||||
((anon*=1024))
|
||||
|
||||
# Mapped pages
|
||||
|
@ -163,7 +163,7 @@ EOF
|
||||
function grab_slab() {
|
||||
# Grabbing slab total from meminfo is easier than doing the math
|
||||
# on slabinfo
|
||||
item=$(fgrep "Slab:" /proc/meminfo | awk '{print $2}')
|
||||
item=$(grep -F "Slab:" /proc/meminfo | awk '{print $2}')
|
||||
((item*=1024))
|
||||
|
||||
local json="$(cat << EOF
|
||||
@ -196,7 +196,7 @@ function grab_system() {
|
||||
local free_decr=$((base_mem_free-item))
|
||||
|
||||
# Anon pages
|
||||
local anon=$(fgrep "AnonPages:" /proc/meminfo | awk '{print $2}')
|
||||
local anon=$(grep -F "AnonPages:" /proc/meminfo | awk '{print $2}')
|
||||
((anon*=1024))
|
||||
|
||||
# Mapped pages
|
||||
|
Loading…
Reference in New Issue
Block a user