Skip to content

Commit

Permalink
inside each task, disk will be mounted as /cromwell_root?
Browse files Browse the repository at this point in the history
  • Loading branch information
malachig committed Oct 7, 2022
1 parent e6a91e7 commit 2984870
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/monitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
Expand Down

0 comments on commit 2984870

Please sign in to comment.