mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 16:27:50 +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() {
|
function grab_slab() {
|
||||||
# Grabbing slab total from meminfo is easier than doing the math
|
# Grabbing slab total from meminfo is easier than doing the math
|
||||||
# on slabinfo
|
# on slabinfo
|
||||||
item=$(fgrep "Slab:" /proc/meminfo | awk '{print $2}')
|
item=$(grep -F "Slab:" /proc/meminfo | awk '{print $2}')
|
||||||
((item*=1024))
|
((item*=1024))
|
||||||
|
|
||||||
local json="$(cat << EOF
|
local json="$(cat << EOF
|
||||||
@ -213,7 +213,7 @@ function grab_system() {
|
|||||||
local free_decr=$((base_mem_free-item))
|
local free_decr=$((base_mem_free-item))
|
||||||
|
|
||||||
# Anon pages
|
# Anon pages
|
||||||
local anon=$(fgrep "AnonPages:" /proc/meminfo | awk '{print $2}')
|
local anon=$(grep -F "AnonPages:" /proc/meminfo | awk '{print $2}')
|
||||||
((anon*=1024))
|
((anon*=1024))
|
||||||
|
|
||||||
# Mapped pages
|
# Mapped pages
|
||||||
|
@ -163,7 +163,7 @@ EOF
|
|||||||
function grab_slab() {
|
function grab_slab() {
|
||||||
# Grabbing slab total from meminfo is easier than doing the math
|
# Grabbing slab total from meminfo is easier than doing the math
|
||||||
# on slabinfo
|
# on slabinfo
|
||||||
item=$(fgrep "Slab:" /proc/meminfo | awk '{print $2}')
|
item=$(grep -F "Slab:" /proc/meminfo | awk '{print $2}')
|
||||||
((item*=1024))
|
((item*=1024))
|
||||||
|
|
||||||
local json="$(cat << EOF
|
local json="$(cat << EOF
|
||||||
@ -196,7 +196,7 @@ function grab_system() {
|
|||||||
local free_decr=$((base_mem_free-item))
|
local free_decr=$((base_mem_free-item))
|
||||||
|
|
||||||
# Anon pages
|
# Anon pages
|
||||||
local anon=$(fgrep "AnonPages:" /proc/meminfo | awk '{print $2}')
|
local anon=$(grep -F "AnonPages:" /proc/meminfo | awk '{print $2}')
|
||||||
((anon*=1024))
|
((anon*=1024))
|
||||||
|
|
||||||
# Mapped pages
|
# Mapped pages
|
||||||
|
Loading…
Reference in New Issue
Block a user