Merge pull request #10099 from GabyCT/topic/fixmemo

metrics: Update memory tests to use grep -F
This commit is contained in:
GabyCT 2024-08-01 13:48:36 -06:00 committed by GitHub
commit 20a88b6470
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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