Skip to content

Commit

Permalink
[Tools] Change memory check from free command (Azure#6211)
Browse files Browse the repository at this point in the history
Changing the memory check from free command to reading directly from the /proc/meminfo file.
  • Loading branch information
ggjjj authored Mar 16, 2022
1 parent 4417a86 commit 6563717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platform-validation/scripts/aziot-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,8 @@ check_free_memory() {
eval iotedge_binary_memory='$'"$(echo "$ARCH"_iotedge_binaries_avg_memory)"
eval iotedge_container_memory='$'"$(echo "$ARCH"_iotedge_container_memory)"
total_iotedge_memory_size=$(echo $iotedge_binary_memory $iotedge_container_memory $iotedge_memory_buffer | awk '{print $1 + $2 + $3}')
current_free_memory=$(free -m | awk '/^Mem/ {print $4}')
current_free_memory=$(cat /proc/meminfo | grep "MemAvailable" | awk '{print $2/1024}')

#TODO: correct final link of aka.ms/iotedge with the setup info of memory analysis.
base_message="IoT Edge requires a minimum memory of $total_iotedge_memory_size MB for running the default setup as described in aka.ms/iotedge. We verified that the the device has $current_free_memory MB of free memory"

Expand Down

0 comments on commit 6563717

Please sign in to comment.