From 2984870563dffa7709da3ff22c42492dfe4561eb Mon Sep 17 00:00:00 2001 From: Malachi Griffith Date: Fri, 7 Oct 2022 17:02:25 -0500 Subject: [PATCH] inside each task, disk will be mounted as /cromwell_root? --- scripts/monitor.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/monitor.sh b/scripts/monitor.sh index cda52b2..74b3d2a 100644 --- a/scripts/monitor.sh +++ b/scripts/monitor.sh @@ -21,9 +21,9 @@ do MEMORY_P_PEAK=$(echo $MEMORY_P $MEMORY_P_PEAK | awk '{if ($1 > $2) print $1; else print $2}') MEMORY_G_PEAK=$(echo $MEMORY_G $MEMORY_G_PEAK | awk '{if ($1 > $2) print $1; else print $2}') - #Retrieve current disk usage as percent and GB (assumes disk used by cromwell is mounted as '/mnt/disks/local-disk') - DISK_P=$(df -h | awk '$NF=="/mnt/disks/local-disk"{printf "%s", $5}' | tr -d "%" | awk '{printf "%.2f", $1}') - DISK_G=$(df -B 1K | awk '$NF=="/mnt/disks/local-disk"{printf "%.2f", $4/1024/1024}') + #Retrieve current disk usage as percent and GB (assumes disk used by cromwell is mounted as '/mnt/disks/local-disk' host machine OR '/cromwell_root' inside the docker image) + DISK_P=$(df -h | awk '$NF=="/cromwell_root"{printf "%s", $5}' | tr -d "%" | awk '{printf "%.2f", $1}') + DISK_G=$(df -B 1K | awk '$NF=="/cromwell_root"{printf "%.2f", $4/1024/1024}') #Check for and store peak disk usage DISK_P_PEAK=$(echo $DISK_P $DISK_P_PEAK | awk '{if ($1 > $2) print $1; else print $2}')